Greetings, everyone!

I've got a class that represents kind of a tool bar. To add an action, I've managed to provide the following two methods:

Qt Code:
  1. QAction* addAction(QString title, QObject* receiver, char* slot);
  2. QAction* addAction(QString title, std::function<void()> functor);
To copy to clipboard, switch view to plain text mode 

These methods allow me to do things like these:

Qt Code:
  1. theToolBar->addAction("foo", theReceiver, SLOT(theSlot()));
  2. theToolBar->addAction("bar", [](){ bar(); })
To copy to clipboard, switch view to plain text mode 

Now one thing I did not accomplish: Use the new cool C++11-signal-slot-syntax!

I'd like to write my code like this:

Qt Code:
  1. theToolBar->addAction("foobar", theReceiver, &TheReceiverClass::theSlot)
To copy to clipboard, switch view to plain text mode 

But how would the signature of the new overload of addAction look like?

I would appreciate any help. (Quite honestly, this wouldn't be an important fetaure at all but at least it would be consistent.)

Maximilian