As fleitz says, std::function can do more. It can accept any callable. The delegate is restricted to just calling functions. In particular, it means that the client can't bind any extra parameters which can be really useful.
That said, popular implementations of std::function employ small object optimizations so the usescases that delegate supports doesn't incur heap allocations. I would guess that delegate has a slight upper hand when it comes to call performance. I really doubt the difference would matter when used in GUI programming.
'Class template std::function is a general-purpose polymorphic function wrapper. Instances of std::function can store, copy, and invoke any Callable target -- functions, lambda expressions, bind expressions, or other function objects, as well as pointers to member functions and pointers to data members.'
This clearly does more than the OPs code and therefore has more complexity.
That said, popular implementations of std::function employ small object optimizations so the usescases that delegate supports doesn't incur heap allocations. I would guess that delegate has a slight upper hand when it comes to call performance. I really doubt the difference would matter when used in GUI programming.