Vertical slider increment
-
Hello guys,
i want to use a vertical slider to increase a variable
void MainWindow::on_verticalSlider_sliderMoved(int position) { ui->verticalSlider->setRange(1,50); }i have already got this, but i don't know how to increment a variable when the slider moove
thanks
-
Hi,
Do you mean connect a slot to the
sliderMovedsignal of your verticalSlider object and call something like++myVariable;in it ? -
Since it's the same slider then you can add the logic to your on_verticalSlider_sliderMoved slot.
-
From what you described, yes.