[Interest] Strange side effect when setting window modality on message box

Bernhard private at bernhard-lindner.de
Tue Feb 24 11:26:29 CET 2015


I am using the following code to open message boxes in Qt 5.4:

QMessageBox* messageBox = new QMessageBox();
messageBox->setWindowModality(Qt::ApplicationModal);
messageBox->show();

This code shows a message box having a context help button (which I do not
want).

The following code snippets both do not show the context help button:

QMessageBox* messageBox = new QMessageBox();
messageBox->show();

QMessageBox* messageBox = new QMessageBox();
messageBox->open();

Is there any sense in this behavior? Why does calling setWindowModality()
enable the context help button? 

-- 
Kind Regards
Bernhard Lindner






More information about the Interest mailing list