QScrollArea contents paints on top of neighbour QGLWidget
-
Hi,
I have encountered a problem where the non visible contents of a QScrollArea, placed next to QGLWidget, will paint on top of the QGLWidget. It is not a problem for other widgets than QGLWidget and the QGLWidget does not receive events of any kind when the scroll bar in the scroll area is moved, so how can this be avoided?
Here is a minimal example illustrating the problem with a QGLWidget next to a QScrollArea with a QCalendarWidget:
@
#include <QApplication>
#include <QGLWidget>
#include <QScrollArea>
#include <QHBoxLayout>
#include <QCalendarWidget>
#include <QDialog>int main(int argc, char *argv[])
{
QApplication app(argc, argv);QCalendarWidget* pCalendarWidget = new QCalendarWidget();
pCalendarWidget->setMinimumWidth(400);
QScrollArea* pScrollArea = new QScrollArea();
pScrollArea->setFixedWidth(200);
pScrollArea->setWidget(pCalendarWidget);QGLWidget* pGLWidget = new QGLWidget();
pGLWidget->setMinimumWidth(200);QHBoxLayout* pLayout = new QHBoxLayout();
pLayout->addWidget(pScrollArea);
pLayout->addWidget(pGLWidget);QDialog Dialog;
Dialog.setMinimumSize(400, 300);
Dialog.setLayout(pLayout);
Dialog.show();
return app.exec();
}
@ -
Here are two image showing the problem. After scrolling the calendar widget it can be seen that white has been painted on top of the QGLWidget:
http://postimage.org/image/ljty0p8xr/
http://postimage.org/image/qcgsuutqt/
Doesn't this look like a Qt bug?
-
I am also seeing exactly this, but only on Linux. It works fine on Windows 7.
Does anyone have a very simple example of placing a QGLWidget inside of a QScrollArea, which resides next to another control, such as a QDockWidget? Any help would be greatly appreciated.
-
I am also seeing exactly this, but only on Linux. It works fine on Windows 7.
Does anyone have a very simple example of placing a QGLWidget inside of a QScrollArea, which resides next to another control, such as a QDockWidget? Any help would be greatly appreciated.