Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.5.0
-
None
-
windows
Description
Launching a second QApplication after the first one has completed produces a spurious warning about not running from the main thread, functionality appears correct.
Would be cool if this didn't trigger a warning, right now the solution is to build custom version of qt...
#include <QApplication> #include <thread> int main(int argc, char *argv[]) { auto gui_wapper = []{ int nope = 0; QApplication a(nope, nullptr); QMetaObject::invokeMethod(&a, "quit", Qt::QueuedConnection); return a.exec(); }; std::thread t1(gui_wapper); t1.join();//no spurious warnings, everything works as expected std::thread t2(gui_wapper); t2.join();//spurious warning, makes me look silly return 0; }