Results 1 to 20 of 20

Thread: display QSplashScreen

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 66 Times in 62 Posts

    Default Re: display QSplashScreen

    ok, this code is working

    Qt Code:
    1. #include <QtGui/QApplication>
    2. #include "qtnetwork.h"
    3. #include<QTimer>
    4. #include <QSplashScreen>
    5. #include <QMainWindow>
    6.  
    7. int main(int argc, char *argv[])
    8. {
    9. QApplication a(argc, argv);
    10.  
    11. splash->setPixmap(QPixmap("C:\\Documents and Settings\\am002bh\\Desktop\\error-checkin.PNG"));
    12. splash->show();
    13.  
    14. QMainWindow mainWin;
    15.  
    16. QTimer::singleShot(2500, splash, SLOT(close()));
    17. QTimer::singleShot(2500, &mainWin, SLOT(show()));
    18.  
    19. return a.exec();
    20. }
    To copy to clipboard, switch view to plain text mode 

    i have used QMainWindow and instead of using a qrc, i have used a straight path..so either u have a problem with ur qrc or mainwindow itself

  2. The following user says thank you to talk2amulya for this useful post:

    HelloDan (13th February 2009)

  3. #2
    Join Date
    Feb 2009
    Location
    Guangzhou,China
    Posts
    89
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    17

    Default Re: display QSplashScreen

    Thanks all of you.

    I made a mistake. There are two winMain.show();

    QTimer::singleShot(2500, splash, SLOT(close()));
    QTimer::singleShot(2500, &mainWin, SLOT(show()));


    mainWin.show();

  4. #3
    Join Date
    Apr 2010
    Posts
    23
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Default Re: display QSplashScreen

    Quote Originally Posted by HelloDan View Post
    Thanks all of you.

    I made a mistake. There are two winMain.show();

    QTimer::singleShot(2500, splash, SLOT(close()));
    QTimer::singleShot(2500, &mainWin, SLOT(show()));


    mainWin.show();
    could you please post the complete working code?
    also r u working on on Which OS r u working?

    Thanks

Similar Threads

  1. OS/X how to get physical display handle
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 3rd January 2009, 19:51
  2. phonon on a "secondary" display (X11)
    By mnavarro in forum Qt Programming
    Replies: 10
    Last Post: 21st November 2008, 16:38
  3. Display only PNG image on desktop
    By durbrak in forum Qt Programming
    Replies: 32
    Last Post: 15th March 2008, 21:55
  4. QSplashScreen Weirdness
    By mclark in forum Qt Programming
    Replies: 11
    Last Post: 19th November 2007, 06:49
  5. Graphics view display problem.
    By kiranraj in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2007, 07:08

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.