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

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.9.6, 5.12.0
    • None
    • MacOS 10.13.4
    • 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

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

        Activity

          People

            vestbo Tor Arne Vestbø
            myxingkong 小 名
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes