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