PDA

View Full Version : QScrollArea, Vertical Scrollbar flashes up while adding widgets



HappyCoder
2nd December 2015, 08:58
Hello,

i have a QScrollArea where i add some custom widgets. The horizontal scrollbar is "AlwaysOff"
and the vertical is set to "AsNeeded". Now i have the small problem with the vertical scrollbar.
When adding the widgets the vertical scrollbar flashed up and hide when adding the widgets is finished.
The vertical scroll flahes up for some milliseconds, i can't say how long but it is visible very short.

How can i prevent that the vertical scrollbar flashes up it it is set to "AsNeeded"?

Thx

anda_skoa
4th December 2015, 16:26
You could set the scrollbar policy to "off" before adding the widget and reset it to "as needed" when you are done.

Cheers,
_