Showing a QWidget in a separate thread
-
I made a widget for splash screen. It will open before MainWindow opens, but when calling MainWindow, Splash Screen freezes for a while until MainWindow opens. I want to open the Splash Screen widget to another thread in main.cpp so that it does not freeze. Can you help me?
-
I made a widget for splash screen. It will open before MainWindow opens, but when calling MainWindow, Splash Screen freezes for a while until MainWindow opens. I want to open the Splash Screen widget to another thread in main.cpp so that it does not freeze. Can you help me?
@LeftDad
Hello and welcome.You cannot/must not do any Qt UI operations from any secondary thread. Only the main, UI thread is allowed to do anything to widgets etc. So that is not the way to do it.
Find out/show what it is that you are doing which causes a problem. Qt provides a QSplashScreen class intended for just this purpose.