Reputation: 981
I encountered a weird problem using QDockWidget:
my essential code:
void iMainWindow::createDockWindows()
{
camera = cvCreateCameraCapture(0);
assert(camera);
QDockWidget *dock = new QDockWidget(tr("2D Camera"), this);
dock->setAllowedAreas(Qt::RightDockWidgetArea);
pixmapLabel = new MyCameraWindow(camera, dock);//class MyCameraWindow : public QWidget
dock->setWidget(pixmapLabel);
addDockWidget(Qt::RightDockWidgetArea, dock);
}
when I run my program, it comes out to be normal
However, if I drag the dock part outside, the windows title bar disappears.
refer : the image and my explanation
Moreover, after dragging the dock widget outside, the command window shows qbackingstore::flush() called with non-exposed window
How can I keep the windows title bar after dragging the dock widget outside?
Upvotes: 0
Views: 1306
Reputation: 1124
Assuming MyCameraWindow is(or contains) a QGLWidget, you've run into a bug I reported here: https://bugreports.qt-project.org/browse/QTBUG-29359. There is no workaround that I know of(in Qt 5.0.0)
Upvotes: 1