hello...
i am trying to display a splash screen before my application starts. But it is not displaying SplashScreen. given below is my code.
#include <QApplication>
#include "client.h"
int main(int argc, char *argv[])
{
splash->show();
app.processEvents();
splash->showMessage("Loaded modules");
client client;//inherited from QDialog
splash->finish(&client);
client.show();
QTimer::singleShot(5000,splash,
SLOT(close
()));
// timer needs the event queue
return app.exec();
}
#include <QApplication>
#include "client.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPixmap pixmap("redcross.png");
QSplashScreen *splash = new QSplashScreen(pixmap);
splash->show();
app.processEvents();
splash->showMessage("Loaded modules");
client client;//inherited from QDialog
splash->finish(&client);
client.show();
QTimer::singleShot(5000,splash,SLOT(close())); // timer needs the event queue
return app.exec();
}
To copy to clipboard, switch view to plain text mode
thanx
Bookmarks