QSplashScreen and QWebView
Dear All,
I have an application where the main window consists of various QWebView widgets. When the application starts, a QSplashScreen object is displayed to the user. How can I tell the QSplashScreen object to stay visible until all the html pages are properly loaded in their respective QWebView widgets?
Thanks in advance.
Re: QSplashScreen and QWebView
Does this not work void QSplashScreen::finish ( QWidget * mainWin )
Re: QSplashScreen and QWebView
Hi Santosh,
No, it does not work, since QSplashScreen::finish will make the splash screen disappear after the QWebView widgets have been created. This does not however guarantees that the html pages of the relative QWebView widgets have been loaded as well.
Re: QSplashScreen and QWebView
how are you using QSplashScreen?
Re: QSplashScreen and QWebView
Hi Santosh.
I am using QSplashScreen as follows:
Code:
#include <QtGui/QApplication>
#include "myapp.h"
#include <QSplashScreen>
int main(int argc, char *argv[])
{
mainWindow w;
splash->show();
Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;
splash
->showMessage
(QObject::tr("Setting up the main window..."),topRight,Qt
::white);
w.setCentralWidget(w.splitter);
w.show();
app.processEvents();
splash->finish(&w);
delete splash;
return app.exec();
}
Re: QSplashScreen and QWebView
you are deleting the "splash" ! delete it when you are done loading (somewhere in a slot), also either set a parent to "splash" or create it on stack.
I assume QWebView loading is initiated in mainWindow, then have a finishedLoading() signal in mainWindow, and connect it to delteLater() or close() of "splash"