PDA

View Full Version : QSlider slot trigger issue



depsch
18th September 2009, 03:20
I am using a QSlider for my animation time line. The value can be changed in 2 ways, one is the user drags the slider physically changing its value, and the other is the system updates the slider value when u hit the play button.
The problem is I only want the valueChanged Signal to trigger the slot function when the user is dragging the slider. Not when the system is simply updating the slider value during playback.
How do I make sure only the user action triggers the slot.

Thanks

yogeshgokul
18th September 2009, 05:25
The problem is I only want the valueChanged Signal to trigger the slot function when the user is dragging the slider. Not when the system is simply updating the slider value during playback.
Probably you have connected the signal valueChanged() of slider.
You need to use signal sliderMoved() instead.
This will ensure the slot invocation only when slider moved not by value changed.