[英]QGLWidget maximum size
I have a Qt application using OpenGL drawing with QGLWidget
, on Mac OS. 我在Mac OS上有一个使用OpenGL绘图和QGLWidget
的Qt应用程序。 On my MBP it works well, but when trying on a 30" screen, I noticed that there is a window size limit. 在我的MBP上,它可以很好地运行,但是在30英寸的屏幕上尝试时,我注意到有一个窗口大小限制。
If I increase the window size beyond a certain limit, the QGLWidget
's content disappears and only some greyish memory junk is visible. 如果我将窗口大小增加到某个限制之外,则QGLWidget
的内容将消失,并且只能看到一些灰色的内存垃圾。
I changed the code to only put a QGLWidget
on the screen. 我将代码更改为仅在屏幕上放置QGLWidget
。 The repaint event
is setting the background black in each iteration. repaint event
在每次迭代中将背景设置为黑色。
The issue is still visible: when resizing the widget, the black surface disappears and gets replaced by the memory junk, when the size of the widget reaches a certain size. 问题仍然存在:调整窗口小部件的大小时,当窗口小部件的大小达到一定大小时,黑色表面消失并被内存垃圾代替。
Interesting facts: 有趣的事实:
我发现,虽然实例化QGLWidget
使用QGLFormat(QGL::NoSampleBuffers)
而不是QGLFormat(QGL::SampleBuffers)
解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.