but so as to use the syntax of the function pointer as in QObject :: connect in the QT5 version, and not (const char *):
connect(const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) For example, I want to create a class function like this:
class CommandHub : public QObject { Q_OBJECT public: ... //эта void connectCommand(const QString &commandId, QObject *object, PointerToMemberFunction slot); ... }; I want to call connectCommand as follows:
CommandHub commandHub; //... commandHub.connectCommand("open", someWidget, &SomeWidget::onOpen); That is, the question is: what to use instead of PointerToMemberFunction, so that you can substitute a pointer to the slot of the object?