QMessageBox::show() and exec() behaviour combination required?



  • Hi,
    I am displaying a QMessageBox by show().
    This does not "freeze" all other widget like it does for exec().
    However I am not using exec() because I want the event loop running.
    So how do I freeze all other widgets and also have a running event loop?



  • QMessageBox::open()



  • when you do exec event loop is running. MessageBox is modal dialog. I don't see any issue. Did you miss any functionality here ? Not sure what do you mean by "I want event loop running". Do you mean to say that you would like to work with other parent windows ?



  • Seems that he want to get a modal MessageBox without a local event loops running(only the main event loop running).

    If so, he is looking for QDialog::open()/QMessageBox::open()/QMenu::popup()



  • 1+1=2 yes you understood correctly.
    I feel setWindowModality() does the job for me.
    Thanks for your advice Dheerendra & 1+1=2.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.