Hi. I've got a problem. I've created splashscreen, timer to it, but have a problem. Splashscreen is not displayed when application starts. Here's the code from main.cpp:
Qt Code:
  1. #include <QApplication>
  2. #include <QPlastiqueStyle>
  3. #include <QSplashScreen>
  4. #include <QTimer>
  5. #include "maker.h"
  6. #include "about.h"
  7.  
  8. int main(int argc, char *argv[])
  9. {
  10. QApplication::setStyle ( new QPlastiqueStyle() );
  11. QApplication app(argc, argv);
  12. QPixmap pixmap(":new/prefix1/poker.png");
  13. QSplashScreen splash(pixmap);
  14.  
  15.  
  16. QTimer splashTimer;
  17.  
  18. splashTimer.setSingleShot( true );
  19.  
  20. splashTimer.setInterval( 4000 ); //4 seconds
  21.  
  22. QObject::connect( &splashTimer, SIGNAL( timeOut() ), &splash, SLOT( close()) );
  23. splashTimer.start();
  24. splash.show();
  25.  
  26. MainWindow MainWindow;
  27. MainWindow.show();
  28.  
  29. return app.exec();
  30. }
To copy to clipboard, switch view to plain text mode 
Of course I have this image in my resource file. What's wrong? Regards