Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-7769

QFontDialog::exec() never returns on OSX

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.1
    • 4.5.1, 4.6.1
    • None
    • None
    • OS X 10.5.8
    • macOS
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            cduclos Carlos Duclos (Inactive)
            abatkin Adam Batkin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes