Hi!

I have a QScrollArea showing a QVBoxLayout with multiple widgets. At certain points of time, some (child-)widgets need to be disabled or enabled. Sometimes this is triggered by user actions on other widgets, sometimes this is triggered by internal events like timers, without any direct input from the user.

My problem is that QScrollArea automatically ensures visibility for widgets, as they become enabled. In my case, this leads to unwanted scroll actions. I.e., the user changes a control in the upper region of the scrolled area, and, as a result, QScrollArea automatically scrolls down. This can be quite annoying for the user, when the currently used control suddenly jumps out of sight.

The only solution I'm aware of, is disabling the whole scrolled widget first, then enabling the intended child widget, and finally enabling the whole scrolled widget again. This works pretty well, except for simultaneous user actions being aborted. As I said, sometimes this is triggered by something like timers, so the user might use, lets say, a QComboBox inside the scrolled area, while the whole scrolled widget is disabled for a short period of time. This leads to user interactions being randomly aborted without any obvious reason. (Which is also annoying...)

Any other ideas?

Thanks!
Philipp