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

Mac OS: QDockWidgets containing OpenGL Widget can not be moved/detached

    XMLWordPrintable

Details

    • macOS
    • 5dfda7a556485ff07448f5bc2006ac4132e33e7d

    Description

      This program demonstrates the Issue on my setup. It contains a MainWindow with a DockWidget containing a GLWidget. Trying to detach or move the dock widget fails, dragging stops, sometimes the dock widget gets stuck on the mouse cursor and moves with it even if I stop clicking. And sometimes the widget just snaps back to the main window, even when it is not nearby. Meanwhile, the contents of the QGLWidget are not visible.

      #include <QtWidgets>
      #include <QtOpenGL>
      #include <QMainWindow>
      #include <QApplication>
       
      class MainWindow : public QMainWindow
      {
      public:
          MainWindow();
      };
       
      MainWindow::MainWindow()
      {
              setAnimated(false);
              QTextEdit * textEdit = new QTextEdit;
              textEdit->setText(QString("The OpenGL containing Dock Widget is broken on OS X with Qt 5"));
              setCentralWidget(textEdit);
              setWindowTitle(tr("Dock Widgets"));
              // Create Dock Widget
              QDockWidget *dock = new QDockWidget(tr("GL Dock"), this);
              QGLWidget * w = new QGLWidget(dock);
              dock->setWidget(w);
          addDockWidget(Qt::RightDockWidgetArea, dock);
      }
       
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
          MainWindow mainWin;
          mainWin.show();
          return app.exec();
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              dedietri Gabriel de Dietrich (drgvond)
              cbreak Gerhard Röthlin
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes