2023-01-30 Fred Gleason <fredg@paravelsystems.com>

* Refactored splash screen code so as not to hide the splash screen
	until after the event loop is started.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2023-01-30 16:48:54 -05:00
parent 822fb1de92
commit fee898fb56
4 changed files with 22 additions and 5 deletions

View File

@@ -61,7 +61,7 @@ MainWidget::MainWidget(RDConfig *config,QWidget *parent)
//
// Splash Screen
//
air_splash_screen=new SplashScreen();
air_splash_screen=new SplashScreen(this);
air_splash_screen->show();
air_splash_screen->showMessage(tr("Opening database..."));
@@ -826,7 +826,11 @@ void MainWidget::ripcConnectedData(bool state)
delete q;
}
}
air_splash_screen->finish(this);
QTimer *timer=new QTimer();
timer->setSingleShot(true);
connect(timer,SIGNAL(timeout()),air_splash_screen,SLOT(finish()));
timer->start(0);
}