Reputation: 11
I want to get a scroll bar's state (stop or no action, move) like onScrollStateChanged
in Android. Does anyone know how to do it?
Upvotes: 1
Views: 4379
Reputation: 2632
Since scrollbar inherits from QAbstractSlider
it has all the signals emitted by QAbstractSlider
. http://doc.qt.io/qt-5/qscrollbar.html#details
For Eg:
valueChanged();
sliderPressed();
sliderMoved();
etc.
Upvotes: 0
Reputation: 6819
See QScrollBar and use the signal that you like
- valueChanged() is emitted when the scroll bar's value has changed. The tracking() determines whether this signal is emitted during user interaction.
- rangeChanged() is emitted when the scroll bar's range of values has changed.
- sliderPressed() is emitted when the user starts to drag the slider.
- sliderMoved() is emitted when the user drags the slider.
- sliderReleased() is emitted when the user releases the slider.
- actionTriggered() is emitted when the scroll bar is changed by user interaction or via the triggerAction() function.
Upvotes: 2