Programmatically scroll QScrollArea

Viewed 20176

I have a Widget with QScrollArea in it and I want it to be scrolled down right after the widget containing it is shown. I tried:

scrollArea->ensureVisible(0,100, 20, 20);

It works only when invoked by user (pushing button for example). Putting it in widget contstructor or showEvent doesn't work. Can it be done automatically?

2 Answers
Related