When starting my app, I have a splash screen displayed while the rest of the app loads. It should disappear when my app shows up.
This is part of my main() function :
@int main(int argc, char *argv)
QApplication a(argc, argv);
// This will hide the cursor when app runs on target board
a.setOverrideCursor( QCursor( Qt::BlankCursor ) );
// this will show a splash screen while loading the rest of the app QPixmap pixmap ("/images/splash.bmp"); QSplashScreen *splash = new QSplashScreen(pixmap); QFont font("FreeSans", 48, QFont::Bold); splash->setFont(font); splash->showNormal(); splash->showMessage(QObject::tr("Loading..."), Qt::AlignTop | Qt::AlignHCenter);
MyWindow w; w.show();
I notice however that the splash screen disappears before the app screen is visible. Between the end of the splash screen and the beginning of the app screen, there's a small gap (maybe 1 sec) displaying a uniform screen (in my case a blue screen).
How can I prevent/solve this ?
I taught, the splash's finish function was intended to do a smooth transition from splash to app. Shouldn't it wait to stop till the app's window shows up...?