Results 1 to 3 of 3

Thread: QSplashScreen Question

  1. #1
    Join Date
    Oct 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default QSplashScreen Question

    Dear All,

    I am using Qt 4.4 on Windows XP. My main window is composed of, among other widgets, by several QWebView widgets that load JavaScript-based graphs. I am using a QSplashScreen in the main class. My problem is that after the QSplashScreen disappears the Main Window appears, however the user cannot interact with since the JavaScript graphs still load in the QWebView widgets. My question is how can I make QSplashScreen disappear only after the QWebView widgets have finished loading the JavaScript graphs? A minimal working example is more than welcome.

    Thanks in advance.
    Last edited by fuzzylogic; 29th October 2011 at 10:58. Reason: spelling corrections

  2. #2
    Join Date
    Jul 2010
    Location
    Lagos, Nigeria
    Posts
    7
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QSplashScreen Question

    You can check the book, C++ GUI programming with Qt4, a good example is there and also, well explained.

  3. #3
    Join Date
    Oct 2011
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QSplashScreen Question

    Thanks for the prompt feedback. Are you referring to the following example?

    Qt Code:
    1. int main(int argc, char *argv[])
    2. {
    3. QApplication app(argc, argv);
    4.  
    5. splash->setPixmap(QPixmap(":/images/splash.png"));
    6. splash->show();
    7.  
    8. Qt::Alignment topRight = Qt::AlignRight | Qt::AlignTop;
    9. splash->showMessage(QObject::tr("Setting up the main window..."),
    10. topRight, Qt::white);
    11. MainWindow mainWin;
    12.  
    13. splash->showMessage(QObject::tr("Loading modules..."),
    14. topRight, Qt::white);
    15. loadModules();
    16.  
    17. splash->showMessage(QObject::tr("Establishing connections..."),
    18. topRight, Qt::white);
    19. establishConnections();
    20.  
    21. mainWin.show();
    22. splash->finish(&mainWin);
    23. delete splash;
    24.  
    25. return app.exec();
    26. }
    To copy to clipboard, switch view to plain text mode 

    However, in my case, the corresponding loadModules() and establishConnections() functions are part of the constructor of the mainWin. Any hints?

    Thanks again.

Similar Threads

  1. QSplashScreen with QProgressBar
    By Ratheendrans in forum Qt Programming
    Replies: 2
    Last Post: 1st December 2010, 12:28
  2. QSplashScreen transparncy
    By vajindarladdad in forum Newbie
    Replies: 6
    Last Post: 12th October 2009, 13:12
  3. QSplashScreen 4.5.0 vs. 4.3.4
    By hosseinyounesi in forum Qt Programming
    Replies: 0
    Last Post: 23rd September 2009, 11:43
  4. QSplashScreen question
    By graciano in forum Qt Programming
    Replies: 7
    Last Post: 14th July 2009, 12:39
  5. QSplashScreen Weirdness
    By mclark in forum Qt Programming
    Replies: 11
    Last Post: 19th November 2007, 06:49

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.