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

Window Modal dialogs are broken on OS X when QGLWidget is in hierarchy

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3: Somewhat important
    • None
    • 5.1.0 Beta 1
    • None
    • macOS

    Description

      If you have a QGLWidget within a window's hierarchy, and then attempt to open a WindowModal dialog, it causes two problems:
      1. It shows as application modal dialog.
      2. After closing it, you can't access menu items, like Quit.

      This works in Qt4.8.

      Alternatively, you can work around the problem by always using the window widget as the modal dialog parent. But this was not previously required.

      For example, if you are in some child widget code and write this:
      QMessageBox * box = new QMessageBox(this);
      msgBox->setWindowModality(Qt::WindowModal);
      msgBox->show();
      ... it will cause the described error

      However, if you reference the window widget instead, it will work:
      QMessageBox * box = new QMessageBox(window());

      Attachments

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

        Activity

          People

            tpochep Timur Pocheptsov
            dzedsystems Dyami Caliri
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes