PDA

View Full Version : get slider value



eric
8th November 2007, 19:40
Hi!
I have a slider that slides within the range of 0 and 255. I know how to display the slider value but how do you "extraxt" the slider value for other computational porposes? I know there is a function (slider->value() const) but how do you use it to return the value? Do you need to declare a new custom class for that?
What i need to do is this: every time I change the slider position, I want to assign tthe current slider value to integer A.
Thanks.Eric

marcel
8th November 2007, 19:47
Why don't you connect the slider's valueChanged signal to a slot and assign the value passed to you there to A?