Results 1 to 2 of 2

Thread: QDialog::exec() problem

  1. #1
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: QDialog::exec() problem

    Hi,

    I now experinceing a problem and suspect QDialog::exec() method.

    The problem is sometimes(not often) my mainwindow stays always on top although I click any other windows in my desktop.

    As I said I suspect QDialog::exec() because I didn't set some of the dialogs a parent. Any ideas?


    Added after 1 44 minutes:


    By the way I found winEvent method imlemented

    bool GuiManager::winEvent(MSG* message, long* result) {
    if(message->message == WM_POWERBROADCAST) {
    if(message->wParam == PBT_APMSUSPEND || message->wParam == PBT_APMSTANDBY) {
    if(currentView() == MAIN_VIEW) {
    onSignOutClicked();
    }

    return true;
    }
    } else if(message->message == (WM_USER+48130)) {
    setGuiVisible(true);
    }

    return QMainWindow::winEvent(message, result);
    }
    Could this be the reason why?
    Last edited by zgulser; 27th March 2012 at 11:41.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QDialog::exec() problem

    Calling QDialog::exec() makes the dialog modal, which means you can't interact with the parent window until you close the dialog.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QTcpsocket and QDialog::exec()
    By timewolf in forum Qt Programming
    Replies: 2
    Last Post: 25th August 2011, 08:27
  2. Replies: 9
    Last Post: 25th March 2011, 21:22
  3. QDialog.exec() exiting without calling QDialog::accept()
    By doggrant in forum Qt Programming
    Replies: 3
    Last Post: 2nd February 2011, 11:35
  4. QDialog problem with exec()
    By nomadscarecrow in forum Qt Programming
    Replies: 3
    Last Post: 23rd April 2010, 18:40
  5. problem with show/exec of Qdialog
    By dudedude in forum Qt Programming
    Replies: 1
    Last Post: 23rd December 2008, 11:20

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.