Hi,
This example show me a splash screen for 5 seconds, an then the main window.
#include <QtGui/QApplication>
#include "mainwindow.h"
#include <QSplashScreen>
#include <QTimer>
int main(int argc, char *argv[])
{
splash
->setPixmap
(QPixmap("f0.png"));
splash->show();
splash
->showMessage
(QObject::trUtf8("A preparar a janela principal ..."), Qt
::AlignRight|Qt
::AlignTop, Qt
::black);
MainWindow w;
QTimer::singleShot(5000, splash,
SLOT(close
()));
QTimer::singleShot(5000,
&w,
SLOT(show
()));
return a.exec();
}
#include <QtGui/QApplication>
#include "mainwindow.h"
#include <QSplashScreen>
#include <QTimer>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QSplashScreen *splash = new QSplashScreen;
splash->setPixmap(QPixmap("f0.png"));
splash->show();
splash->showMessage(QObject::trUtf8("A preparar a janela principal ..."), Qt::AlignRight|Qt::AlignTop, Qt::black);
MainWindow w;
QTimer::singleShot(5000, splash, SLOT(close()));
QTimer::singleShot(5000, &w, SLOT(show()));
return a.exec();
}
To copy to clipboard, switch view to plain text mode
During those 5 secs if i click on the QSplassScreen i have "nothing" until the main window shows up.
Can i disable the possibiliti of clicking on the splashscreen?
Thanks
Bookmarks