Can't create a QWidget from dynamic library: "Must construct a QApplication before a QWidget"
General and Desktop
3
Posts
2
Posters
1.4k
Views
1
Watching
-
Hi,
Like the error message says, you need to create a QApplication object in order to use widgets. You also need to start the event loop by calling QApplication::exec().
This needs to be done in a separate thread, to avoid blocking your main thread. Start a new std::thread, and call the initialization function there.