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

QDockWidget loses titlebar in floating mode when QGLWidget is present

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.0.0
    • None
    • Windows XP SP3, Qt 5.0.0 self compiled with -opengl desktop, MSVC 2010 SP1, Nvidia Geforce 250

      The was the same issue in Qt 4.7.0 (QTBUG-14083).
      QDockWidget, if dragged from its position, loses the titlebar and the inner widget can only be moved while mouse button is pressed. If you release the button then the widget is stuck somewhere on the screen.
      This behaviour only occurs if QGLWidget is present in the main window.
      The example that was in issue 14083 still illustrates the problem:

      #include <QApplication>
      #include <QPushButton>
      #include <QDockWidget>
      #include <QMainWindow>
      #include <QLabel>
      #include <QtOpenGL/QGLWidget>
      
      int main(int argc, char *argv[])
      {
      	QApplication app(argc, argv);
      	QMainWindow w;
      
      	QPushButton hello("Hello world!");
      	hello.resize(100, 30);
      	w.setCentralWidget(&hello);
      	QDockWidget *dock = new QDockWidget("gl");
      	dock->setAllowedAreas(Qt::TopDockWidgetArea);
      	dock->setWidget(new QGLWidget());
      	w.addDockWidget(Qt::TopDockWidgetArea, dock);
      
      	QDockWidget *dock2 = new QDockWidget("hi");
      	dock2->setAllowedAreas(Qt::RightDockWidgetArea);
      	dock2->setWidget(new QLabel("hello", &w));
      	w.addDockWidget(Qt::RightDockWidgetArea, dock2);
      
      	w.show();
      	return app.exec();
      }
      

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

            rodal Samuel Rødal
            irdis Alexander
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes