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

floating QDockWidget corruption

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 4.7.0
    • None
    • Kubuntu 10.10, reproducable on laptop and Desktop PC (one with NVidia, another with ATI graphic card)

    Description

      QDockwidget's titlebar buttons and some content is not displayed when undocking the widget (making it float).
      For example, create a simple mainwindow with a QDockWidget containing an QGLWidget. Try to undock it -> bug
      Same problem happens when the QDockWidget 's widget (that is set through setWidget()) has the mainwindow as parent.

      Sample code to reproduce the error:
      When trying to make a dock widget float, and title bar buttons will disappear
      -------------------------------------------------------------------------------------------------------------

      #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();
      }

      Attachments

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

        Activity

          People

            vfm Thierry Bastian (closed Nokia identity) (Inactive)
            j-b-m Jean-Baptiste Mardelle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes