I hope you have a wonderful Christmas.

I encountered a problem using QDockWidget:

my essential code:
Qt Code:
  1. void iMainWindow::createDockWindows()
  2. {
  3. camera = cvCreateCameraCapture(0);
  4. assert(camera);
  5.  
  6. QDockWidget *dock = new QDockWidget(tr("2D Camera"), this);
  7. dock->setAllowedAreas(Qt::RightDockWidgetArea);
  8. pixmapLabel = new MyCameraWindow(camera, dock);//class MyCameraWindow : public QWidget
  9. dock->setWidget(pixmapLabel);
  10. addDockWidget(Qt::RightDockWidgetArea, dock);
  11. }
To copy to clipboard, switch view to plain text mode 

when I run my program, it comes out to be normal:
1.jpg

However, if I drag the dock part outside, the windows title bar disappears:
2.jpg

Moreover, after dragging the dock widget outside, the command window shows:
qbackingstore::flush() called with non-exposed window
3.jpg

How can I keep the windows title bar after dragging the dock widget outside?

Thanks a lot.

Best regards