So my intended program flow is this:
show()
QSplashScreen
instance.QLabel
) to QSplashScreen
instance.The problem is that unless I hide()
the splash screen, call QApplication::processEvents
, add the QLabel
, and then re-show()
the splash screen--causing a huge flicker obviously--the QLabel
doesn't render.
That is, I do not see the notice if I merely write this:
QLabel* pSplashNotice = new QLabel( mpSplashScreen );
pSplashNotice->setObjectName( "SplashNotice" );
pSplashNotice->setWordWrap( true );
pSplashNotice->setText( Localize(my_text) );
pSplashNotice->resize( 1200, 50 );
pSplashNotice->move( 100, 1000 );
mpSplashScreen->raise();
mpSplashScreen->show();
I have to precede the above by
mpSplashScreen->hide();
QApplication::processEvents(QEventLoop::AllEvents);
How can I get pSplashNotice
to render without having to hide the splash screen?
You should add following call
pSplashNotice->show();