Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.5.1, 4.6.1
-
None
-
None
-
OS X 10.5.8
-
-
7a328e4f69f10f4fea6d48746ff214030794328d, 976a2b6ad1f95175d8d0be2d1eb7603cf4e4026a
Description
When a QFontDialog is created and then exec() is called, the exec never returns (until the application exits).
For example, I create a QMainWindow with a button, and attach the clicked() signal to the following function:
void MainWindow::click1() {
qDebug() << "Before Construct";
QFontDialog dlg(this);
qDebug() << "Before exec()";
dlg.exec();
qDebug() << "After exec()";
}
When I click the button, the "Before Construct" and "Before exec()" messages are printed, and the font dialog appears. If I dismiss the dialog (either by pressing OK or Cancel), the dialog closes at which point I can access the main window again (and even press the button to launch the dialog again) but the third message "After exec()" is never printed. Until I exit the application, at which point that message is printed (as many times as I had pressed the button to open the dialog.
For example, if I press the button twice, I end up with the following output:
Before Construct
Before exec()
Before Construct
Before exec()
After exec()
After exec()
Other dialogs seem to work. For example, with a QFileDialog instead, I end up with the following output:
Before Construct
Before exec()
After exec()
Before Construct
Before exec()
After exec()
Which is correct.