PDA

View Full Version : how to use QTimer to animate QSlider



mike b
11th May 2010, 02:15
Hello

I am looking for some sample code that shows how to use QTimer to animate a QSlider. I would really appreciate any examples that might be available. Basically, I would like to use QTimer to increment the slider, every xxx ms. Thanks

aamer4yu
11th May 2010, 05:45
something like -

connect(timer,SIGNAL(timeout()), this,SLOT(onTimeout()));
myClass::onTimeout()
{
slider->setValue( slider->value() + increment );
}

hope you get the idea :)