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

Mac OS: QDockWindow able to float after winId() call, even with QDockWidget::DockWidgetClosable being set only.

    XMLWordPrintable

Details

    • macOS

    Description

      It is only reproducible with OS X system with Qt 5 and above environment. It cannot be reproducible on Windows system.

      QDockWidget* dock1 = new QDockWidget;
      dock1->setFeatures(QDockWidget::DockWidgetClosable);
      dock1->setWindowTitle("Text1");
      QTextEdit* text1 = new QTextEdit;
      text1->append("Text1");
      dock1->setWidget(text1);
      
      qDebug() << text1->winId(); // <- Reason for problem. Enable and disable this line for testing.
      
      addDockWidget(Qt::LeftDockWidgetArea, dock1);
      
      QDockWidget* dock2 = new QDockWidget;
      dock2->setFeatures(QDockWidget::DockWidgetClosable);
      dock2->setWindowTitle("Text2");
      QTextEdit* text2 = new QTextEdit;
      text2->append("Text2");
      dock2->setWidget(text2);
      addDockWidget(Qt::RightDockWidgetArea, dock2);
      
      qDebug() << text2->winId(); // <- Reason for problem. Enable and disable this line for testing.
      

      Attachments

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

        Activity

          People

            tpochep Timur Pocheptsov
            leonlee Leonard Lee
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes