cpow
5th January 2012, 18:31
I've done a lot of Googling to try to find an answer to my question and asked several times on #qt, but to no avail. Hopefully someone somewhere can help!
My application is an IDE. It has quite a few QDockWidgets, and a tabbed center widget. Some of the QDockWidgets contain QGLWidgets. One of the tabs of the center widget contains a QScrollArea which contains a QGLWidget. Here's a screenshot when all is well:
Screenshot without problem (http://i.imgur.com/YCgt9.png)
The QScrollArea/QGLWidget of the center widget is the large graphic area in the middle. There's a docked QDockWidget and an undocked QDockWidget off to the right, each of which contain QGLWidgets rendering different things.
As you can see I've zoomed in to the QScrollArea/QGLWidget using the zoom slider such that the QGLWidget is actually much larger than the QScrollArea's viewport. All is well until I attempt to scroll to the right or down in the QScrollArea/QGLWidget. Here's what it looks like after that.
Screenshot with problem (http://i.imgur.com/8cWW0.png)
The docked QDockWidget has visible white artifacting where it was previously drawn black.
If I dock the undocked QDockWidget and do the same scrolling in the QScrollArea/QGLWidget, the same artifacting shows up in both docked QDockWidgets. If I undock either, the artifacting does not occur in the undocked QDockWidget when scrolling the QScrollArea.
I haven't found a solution to this online. I've tried using QAbstractScrollArea but I'm at a loss for what to do to get it to paint the QGLWidget.
I recently switched to using a QScrollArea to manage scrolling around the QGLWidget because it seemed cumbersome to me the way the scrolling had been implemented in the other views...which did not change the size of the QGLWidget; rather, they implemented the scrolling in the QGLWidget's paintGL.
My application is an IDE. It has quite a few QDockWidgets, and a tabbed center widget. Some of the QDockWidgets contain QGLWidgets. One of the tabs of the center widget contains a QScrollArea which contains a QGLWidget. Here's a screenshot when all is well:
Screenshot without problem (http://i.imgur.com/YCgt9.png)
The QScrollArea/QGLWidget of the center widget is the large graphic area in the middle. There's a docked QDockWidget and an undocked QDockWidget off to the right, each of which contain QGLWidgets rendering different things.
As you can see I've zoomed in to the QScrollArea/QGLWidget using the zoom slider such that the QGLWidget is actually much larger than the QScrollArea's viewport. All is well until I attempt to scroll to the right or down in the QScrollArea/QGLWidget. Here's what it looks like after that.
Screenshot with problem (http://i.imgur.com/8cWW0.png)
The docked QDockWidget has visible white artifacting where it was previously drawn black.
If I dock the undocked QDockWidget and do the same scrolling in the QScrollArea/QGLWidget, the same artifacting shows up in both docked QDockWidgets. If I undock either, the artifacting does not occur in the undocked QDockWidget when scrolling the QScrollArea.
I haven't found a solution to this online. I've tried using QAbstractScrollArea but I'm at a loss for what to do to get it to paint the QGLWidget.
I recently switched to using a QScrollArea to manage scrolling around the QGLWidget because it seemed cumbersome to me the way the scrolling had been implemented in the other views...which did not change the size of the QGLWidget; rather, they implemented the scrolling in the QGLWidget's paintGL.