I've done this:
#include <QApplication>
#include <QPlastiqueStyle>
#include <QSplashScreen>
#include "maker.h"
#include "about.h"
int main(int argc, char *argv[])
{
QPixmap pixmap
("new/prefix1/Poker.jpg");
splashTimer.setSingleShot( true );
splashTimer.setInterval( 4000 ); //4 seconds
connect( &splashTimer, SIGNAL( timeOut() ), &splash, SLOT( close() );
splashTimer.start();
splash.show();
MainWindow MainWindow;
MainWindow.show();
splash.finish(&MainWindow);
return app.exec();
}
#include <QApplication>
#include <QPlastiqueStyle>
#include <QSplashScreen>
#include "maker.h"
#include "about.h"
int main(int argc, char *argv[])
{
QApplication::setStyle ( new QPlastiqueStyle() );
QApplication app(argc, argv);
QPixmap pixmap("new/prefix1/Poker.jpg");
QSplashScreen splash(pixmap);
QTimer splashTimer();
splashTimer.setSingleShot( true );
splashTimer.setInterval( 4000 ); //4 seconds
connect( &splashTimer, SIGNAL( timeOut() ), &splash, SLOT( close() );
splashTimer.start();
splash.show();
MainWindow MainWindow;
MainWindow.show();
splash.finish(&MainWindow);
return app.exec();
}
To copy to clipboard, switch view to plain text mode
As you told me, but there appear errors:
http://allyoucanupload.webshots.com/...25593906661174
What's wrong with this code? It should show splash screen for 4 seconds, and after this time if should start application, right?
Bookmarks