I can't figure out how I can move a slider handle of a QSlider in QT. When I press for example A( I want to move coursor left) and D(I want move coursor right) so I did
(void) new QShortcut(Qt::Key_A, this, SLOT(moveTickmarkLeft()));
(void) new QShortcut(Qt::Key_D, this, SLOT(moveTickmarkRight()));
implementation:
void LCDRange::moveTickmarkLeft()
{
slider->setSliderPosition(slider->sliderPosition - 1);
}
void LCDRange::moveTickmarkRight()
{
slider->setSliderPosition(slider->sliderPosition + 1);
}
the same I did using function setTickPosition()
, what is the difference between setSliderPosition()
and setTickPosition()
how can I implement my idea, thanx in advance for any help