View Full Version : QScrollBar differentiate between programmatic value changes and user interaction ones

21st November 2011, 15:31
I want to differentiate whether a scrollbar changes its value because of my code calls (setValue()) or because of UI interaction (mouse wheel, clicking on the slider, clicking on one of the arrows, clicking on the scrollbar - any of these).

I couldn't understand from the documentation: which signals I should use for that purpose?

Thanks for your help,

28th November 2011, 21:52
Here's how I resolved it eventually: as far as I see, the two signals sliderPressed and actionTriggered cover the cases of UI interaction by the user. I just made sure I had a slot connected to these two signals and then performed whatever logic was exclusive to the "user changed UI and not code" case.