Unfortunately with Qt, QApplication and all GUI-related things must live in the main thread. You can have calculations of things like QImage or other off-screen paint devices occur in a different thread, but they must be displayed by a QWidget in the main thread.
So, I am afraid you need to invert your design so that your calculations are done in worker threads instead of in the main thread.
If you want to use a QDialog, then you need to set its flag to be non-modal, and use show() instead of exec() to display it. exec() causes QDialog to start its own internal event loop, which ignores events from outside. show() uses the same event loop as your application.




Reply With Quote
rocessEvent() when it's possible.

Bookmarks