Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

QScrollArea contents paints on top of neighbour QGLWidget

$
0
0
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(); }

Viewing all articles
Browse latest Browse all 18427

Latest Images

Trending Articles



Latest Images