________________ ______________
| | | |
| | | |
| | | |
| | | |
| 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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parentScrollArea->hide(); | |
parentScrollArea->horizontalScrollBar()->setValue(parentScrollArea->horizontalScrollBar()->value() + x); | |
parentScrollArea->verticalScrollBar()->setValue(parentScrollArea->verticalScrollBar()->value() + y); | |
parentScrollArea->show(); |
No comments:
Post a Comment