I found that while instantiating the QGLWidget
using QGLFormat(QGL::NoSampleBuffers)
instead of QGLFormat(QGL::SampleBuffers)
solves the issue.
QGLWidget maximum size
Question
I have a Qt application using OpenGL drawing with QGLWidget
, on Mac OS.
On my MBP it works well, but when trying on a 30" screen, I noticed that there is a window size limit.
If I increase the window size beyond a certain limit, the QGLWidget
's content disappears and only some greyish memory junk is visible.
I changed the code to only put a QGLWidget
on the screen. The repaint event
is setting the background black in each iteration.
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:
- When I decrease the window size, the GL surface comes back to live again
- I have several other GL applications (not Qt) running in maximized window, so the issue is not with the OpenGL driver/video card
- It seems that the area of the window (nr of pixels) matters, if I make the window very wide, it's height will be limited and vica versa, I if the windoe is maximized in height, the width must be small
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow