当前位置:编程学习 > wap >>

Title bar disappears — qbackingstore::flush() called with non-exposed window

I hope you have a wonderful Christmas.

I encountered a 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:


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?

Thanks a lot.

Best regards --------------------编程问答-------------------- hey, anyone could give some help?

thanks
补充:移动开发 ,  Qt
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,