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

[Regression] Windows: Standard dialogs are no longer modal in Qt 5.0

    XMLWordPrintable

    Details

    • Commits:
       768e587cdcd74d9d5da0a477eede9ae37a24fb48, ad1bd1563f3f65d0f7b65687af2ade42f7f9f3d9, fe0f72fa1a01c41c020afcb95acd503a8dca3a8a

      Description

       bool ok;
       QFont font = QFontDialog::getFont(
                       &ok, QFont("Helvetica [Cronyx]", 10), this);
       if (ok) {
           // the user clicked OK and font is set to the font the user selected
       } else {
           // the user canceled the dialog; font is set to the initial
           // value, in this case Helvetica [Cronyx], 10
       }
      

      The above example code from Qt documentation launches QFontDialog as a modal dialog in Qt 4.8.1, i.e. you can't focus the parent dialog while the QFontDialog is displayed.
      In Qt 5.0, you can focus, move, and resize the parent dialog while QFontDialog is displayed. You still can't seem to be able to focus any controls of the parent, though.

      Examples/dialogs/standarddialogs can be used to demonstrate the issue. QFileDialog is the only one that works properly, but I assume that is because it uses Windows native file dialog.

      I didn't check how non-standard dialogs behave but it is likely this issue is not limited to standard dialogs.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              kleint Friedemann Kleint
              Reporter:
              e0348803 Miikka Heikkinen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes