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

Mac: Closing a QML FileDialog from code does not leave modal state and causes crash on quit

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P1: Critical
    • None
    • 5.5.1, 5.6.2, 5.7.0
    • Extras: Mac
    • None
    • OS X 10.11, macOS 10.12
    • macOS

    Description

      Note: This bug is always reproducible only if embedding Qt into native Cocoa NSView.

      The QML FileDialog can be opened and closed from code using open() and close() methods. When FileDialog is created with default modality settings Qt.WindowModal some controls and menus are disabled (e.g. window close, minimise, zoom buttons).
      If the dialog is dismissed using dialog controls (e.g. Cancel button), the modal state is exited.
      If the dialog is dismissed using dialog's close() method the state is modal not exited, even though it should.

      I've attached sample project based on embeddedqwindow Qt example.
      Steps to reproduce:
      1. Build the project (I've used it with Kits 5.7.0, 5.6.2 and 5.5.1)
      2. Run the project
      3. Click Open File Dialog button
      4. Dialog should open
      5. Click Close File Dialog button
      6. Dialog should close
      7. Try using window buttons (close, minimise, zoom)... no reaction
      8. Quit the app... crash

      Attachments

        Activity

          People

            sorvig Morten Sørvig
            pavol.markovic Pavol Markovic
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: