That would work (run custom code in separate thread in background) but I'd like to avoid that. This is how it worked before and I'd like to run it in main thread to avoid any deadlock/synchronisation dangerous.
What I tried is to run processEvents() loop (with some sleep) in another thread to re-paint the dialog. It runs correctly but without any visible result.
I'm sorry -- it's either threads or stalling the GUI thread while your custom code is running. Adding timers or whatever else that requires event processing will not help you in any way.
Because it processes the other thread which has nothing to process.What I tried is to run processEvents() loop (with some sleep) in another thread to re-paint the dialog. It runs correctly but without any visible result.
You simply have no choice. Either you run custom code in thread other than the GUI thread or your GUI thread will not respond during the time the custom code is ran.
I understand that. But because of QSplashScreen, I though it is somehow possible, isn't it?
And I can't use QSplashScreen from Python (I use PyQt4) because I can't override mousePressEvent (it's protected) so click will close the widget.
No, QSplashScreen works the same way. If you don't let it process events, it will not be updated.
Bookmarks