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

When the main window remains at the top, the child Windows are occluded

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.9.6, 5.12.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      MacOS 10.13.4
    • Platform/s:
      macOS

      Description

      Usually, the tools window is always at the top of the main window, even if it loses focus.However.

      On MacOS, when the main window sets the window flag |Qt::WindowStaysOnTopHint, the Tool window is below it.

      On a Windows system, the Tool window is at the top of the main window as expected.

      Is there a way to keep the main window at the top while the Tool window is above it?

       

      #include <QtGui>
      #include <QtWidgets>
      
      int main(int argc, char * argv[])
      {
          QApplication app(argc, argv);
      
          QDialog* mw = new QDialog(0, Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint);
          mw->setWindowTitle(QLatin1String("Main"));
          mw->resize(400, 300);
          mw->move(100, 100);
          mw->show();
          QWidget* d = new QWidget(mw, Qt::Tool);
          d->setWindowTitle(QLatin1String("Tool"));
          d->resize(200, 100);
          d->show();
          return app.exec();
      }
      

       

        Attachments

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

          Activity

            People

            • Assignee:
              vestbo Tor Arne Vestbø
              Reporter:
              myxingkong 小 名
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes