Results 1 to 3 of 3

Thread: QApplication breaks when QMessageBox left open awhile

  1. #1
    Join Date
    Aug 2007
    Posts
    29
    Thanks
    8
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default QApplication breaks when QMessageBox left open awhile

    I run the following during an update application:
    app->exec();

    Then I give the user an option to update:
    if(QMessageBox::question(this, QString("New Update Available"), QString("A new update is available, download it now?"), QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes)

    now here's the thing...
    If the response comes quickly, say within 10 seconds then app->quit() works as expected.

    But if the user waits a long period of time before responding the Application crashes.

    Any direction as to why this occurs would be appreciated.

    Sean

  2. #2
    Join Date
    Jul 2007
    Posts
    56
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QApplication breaks when QMessageBox left open awhile

    Take a look at these threads. May be something relating to "requestFinished" signal if you are using Qhttp.

    http://www.qtcentre.org/forum/f-qt-p...html#post81459

    http://www.qtcentre.org/forum/f-qt-p...ton-11437.html

  3. The following user says thank you to will49 for this useful post:

    sgmurphy19 (3rd October 2008)

  4. #3
    Join Date
    Aug 2007
    Posts
    29
    Thanks
    8
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QApplication breaks when QMessageBox left open awhile

    Thanks. Did so many searches, but never came across those. Funny how I walked through the same steps. But adding Qt::QueuedConnection at the end of the Signal/Slot worked perfectly for me too.

    Thanks for pointing me in the right direction!

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.