I'm trying to make my first QMetaObject::invokeMethod() call, but it doesn't work.
Here is what I'm doing:
int main(int argc, char *argv[])
{
MainProcess *p = new MainProcess();
p->slotStart();
bool bValue
= QMetaObject::invokeMethod(p,
"slotStart", Qt
::DirectConnection);
// QueuedConnection);
return app.exec();
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainProcess *p = new MainProcess();
p->slotStart();
bool bValue = QMetaObject::invokeMethod(p, "slotStart", Qt::DirectConnection); // QueuedConnection);
return app.exec();
}
To copy to clipboard, switch view to plain text mode
The p->slotStart() calls the method just fine, but the invokeMethod() returns false.
Any ideas?
- BRC
Bookmarks