lundi 28 août 2017

How can I call a method from QMainWindow?

I do need to invoke a method from my MainWindow class, that inherit from QMainWindow class from a class outside MainWindow, something like this:

Q_ASSERT(QMetaObject::invokeMethod(mainWindow, NAMEOF(attachmentDownloadComplete)));

mainWindow is of class MainWindow : public QMainWindow type

the error is:

no matching function for call to 'QMetaObject::invokeMethod(MainWindow*&, const char [27])'
     Q_ASSERT(QMetaObject::invokeMethod(mainWindow, "attachmentDownloadComplete"));

My question is how can I manage to call invoke this method?

Aucun commentaire:

Enregistrer un commentaire