A QGraphicsView should be just as good as a QSplashScreen. Using a QGraphicsView allows you to do much more interesting splash screens plus you have control of the layout. For example I've implemented a "progress bar" but it's circular instead of linear. And the status text is comp'd over the bg image instead of below it.
I suppose it would be possible to use a QSplashScreen along with a QPainter. Essentially all a QSplashScreen is, is a widget with a canned layout, some window flags and a couple of convenience functions. Either way according to the documentation I'll still have the same repaint issues:
splash->show();
... // Loading some items
splash->showMessage("Loaded modules");
qApp->processEvents();
... // Establishing connections
splash->showMessage("Established connections");
qApp->processEvents();
QPixmap pixmap(":/splash.png");
QSplashScreen *splash = new QSplashScreen(pixmap);
splash->show();
... // Loading some items
splash->showMessage("Loaded modules");
qApp->processEvents();
... // Establishing connections
splash->showMessage("Established connections");
qApp->processEvents();
To copy to clipboard, switch view to plain text mode
In Qt3 calling repaint caused the widget to repaint immediately. It doesn't seem like the same thing is happening here. It would be better if you could do the following:
splash->show();
... // Loading some items
splash->showMessage("Loaded modules");
splash->repaint();
... // Establishing connections
splash->showMessage("Established connections");
splash->repaint();
QPixmap pixmap(":/splash.png");
QSplashScreen *splash = new QSplashScreen(pixmap);
splash->show();
... // Loading some items
splash->showMessage("Loaded modules");
splash->repaint();
... // Establishing connections
splash->showMessage("Established connections");
splash->repaint();
To copy to clipboard, switch view to plain text mode
Bookmarks