Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QScrollArea contents paints on top of neighbour QGLWidget
Forum Updated to NodeBB v4.3 + New Features

QScrollArea contents paints on top of neighbour QGLWidget

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    qcoder
    wrote on last edited by
    #1

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

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      qcoder
      wrote on last edited by
      #2

      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?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mfeemster
        wrote on last edited by
        #3

        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.

        github.com/mfeemster/fractorium/wiki

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mfeemster
          wrote on last edited by
          #4

          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.

          github.com/mfeemster/fractorium/wiki

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved