开发者

Issue with QGLWidget

开发者 https://www.devze.com 2023-03-30 06:43 出处:网络
I have a problem with QGLWidget. Actually, with the mouse actions, the QGLWidget will get updated. I have a requirement to open another window from this widget, for example with a double click event.

I have a problem with QGLWidget. Actually, with the mouse actions, the QGLWidget will get updated. I have a requirement to open another window from this widget, for example with a double click event. I am creating a new widget QWidget with QGLWidget as parent and setting the following flags to the new window.

QWidget::setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint);

This new window opens up fine, working as expected. But when I close this window and try to update the QGLWidget, its acting weird. The small part of the total QGLWidget(the area where the new window has opened), is getting updated but not the entire QGLWidget.

Also, missed to update another point here. This issue is no开发者_开发技巧t happening every time. The qt application is opened with another application, redistributed with required dlls. When opened as an independent application, it has no problem. But when opened with other application, the problem resurfaces.

Any ideas why?

Thank you!!


I tossed together a quick Qt app doing what you say and didn't see this problem. The child widget displays as usual. If I move it out of the way or close it, I see the GL scene beneath it. Perhaps you could provide a snippet of code, or a screen shot of the problem.

However, it sounds like somehow your GL window is getting updated with its painter restricted to a specific area as described here.

0

精彩评论

暂无评论...
验证码 换一张
取 消