I know the thread title is a bit confusing but that's because I don't know how to call it.
What I want to get is, when I right-click on some widget i.e. spinBox I get this:

but I'd like to add to this list my own functions. Any idea how to do it?