Sunday, April 14, 2013

Scrolling QScrollArea causes other widgets flickering

Today I've experienced a problem with QScrollArea which was placed besides another widget, like this:

 ________________    ______________
|                |  |              |
|                |  |              |
|                |  |              |
|                |  |              |
|   QWidget      |  |  QScrollArea |
|                |  |              |
|                |  |              |
|                |  |              |
 ----------------    --------------

Now, when my QScrollArea was scrolled into left, that caused part of QWidget that was overlapping with QScrollArea content to flicker.

To avoid this behavior, before scrolling (I am scrolling QScrollArea with buttons, but I guess connecting to the sliderPressed() and sliderRelased() of horizontalScrollBar and verticalScrollBar() should do the trick), you need to hide QScrollArea:

No comments:

Post a Comment