Results 1 to 14 of 14

Thread: Problem with Splash Screen ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2006
    Posts
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Problem with Splash Screen ?

    Hello,

    Here is my code. I am trying to display the "Logo" image as a splash screen on top all of my windows. But when executing , the splash screen is displayed on bottom of the main widget. What is the reason ? How can I solve it ?

    Qt Code:
    1. #include <qapplication.h>
    2. #include "welform.h"
    3. #include <qtimer.h>
    4. #include <qpixmap.h>
    5. #include <qsplashscreen.h>
    6.  
    7.  
    8. int main( int argc, char ** argv )
    9. {
    10.  
    11.  
    12. QSplashScreen *splash=NULL;
    13. QApplication a( argc, argv );
    14. welForm *w;
    15.  
    16.  
    17. QPixmap logo(QPixmap::fromMimeSource("Logo"));
    18. splash=new QSplashScreen(logo,Qt::WStyle_StaysOnTop|Qt::WX11BypassWM);
    19. splash->show();
    20. QTimer::singleShot(5*1000,splash,SLOT(close()));
    21.  
    22. w=new welForm(0,"welForm");
    23. a.setMainWidget(w);
    24. w->show();
    25.  
    26. //delete splash;
    27. //a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
    28. int rc=a.exec();
    29.  
    30. //splash->finish(w); this finish() also not work.... so I commented it.
    31. if(splash)
    32. delete splash;
    33.  
    34. return rc;
    35. }
    To copy to clipboard, switch view to plain text mode 


    thanks in advance............

    A S Vinod
    Last edited by wysota; 7th March 2007 at 10:01. Reason: missing [code] tags

Similar Threads

  1. Splash screen showing for two seconds
    By Koas in forum Qt Programming
    Replies: 5
    Last Post: 17th October 2008, 19:40
  2. Using QGraphicsView as a Splash Screen (repaint issues)
    By chezifresh in forum Qt Programming
    Replies: 3
    Last Post: 4th June 2008, 21:22
  3. QTimer based Splash Screen
    By bpetty in forum Newbie
    Replies: 6
    Last Post: 15th December 2006, 00:51
  4. Replies: 3
    Last Post: 8th December 2006, 18:51
  5. Problem with screen update...
    By mysearch05 in forum Qt Programming
    Replies: 2
    Last Post: 27th January 2006, 18:24

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.