Results 1 to 3 of 3

Thread: QSplashScrren before QDialog

  1. #1
    Join Date
    Feb 2013
    Posts
    12
    Qt products
    Qt5
    Platforms
    Windows

    Default QSplashScrren before QDialog

    Hi, I have a problem. I've got a main window and run from it QDialog. QDialog in the constructor loads a lot of data (it takes about 3-4 seconds while the program is not responding):
    Qt Code:
    1. Statistics * s = new Statistics (this->klient, this);
    2. s->exec();
    3. delete s;
    To copy to clipboard, switch view to plain text mode 
    I wanted to make splash screen to fill this gap. And when constructor go to end emits a signal that is associated with a slot close() of splash screen:
    Qt Code:
    1. QSplashScreen * sS = new QSplashScreen(QPixmap(":/images/logo"));
    2. sS->ShowMessage("Generating statistics", Qt::AlignCenter);
    3. sS->show();
    4. Statistics * s = new Statistics(this->klient, this);
    5. connect (s, SIGNAL (loaded()), sS, SLOT (close()));
    6. s->exec ();
    7. disconnect (s, SIGNAL (loaded ()), sS, SLOT (close ()));
    8. delete s, sS;
    To copy to clipboard, switch view to plain text mode 
    Unfortunately splash screen doesn't show from the beginning, only for a moment before opening QDialog.

    Do you have any idea how to solve it?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QSplashScrren before QDialog


  3. #3
    Join Date
    Feb 2013
    Posts
    12
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QSplashScrren before QDialog

    Doesn't work for me, still it is showed only for a moment before displaying QDialog.

Similar Threads

  1. Replies: 1
    Last Post: 26th March 2013, 02:04
  2. create a QDialog from a QDialog
    By hichemnho in forum Newbie
    Replies: 5
    Last Post: 5th March 2012, 21:48
  3. Replies: 9
    Last Post: 25th March 2011, 21:22
  4. QDialog.exec() exiting without calling QDialog::accept()
    By doggrant in forum Qt Programming
    Replies: 3
    Last Post: 2nd February 2011, 11:35
  5. closing a Qdialog called from a Qdialog
    By OverTheOCean in forum Qt Programming
    Replies: 3
    Last Post: 28th September 2009, 08:02

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.