I have an horizontal scrollbar which change the value (number) of two labels when I scroll it.
Bul, I also want that when you scroll it, it changes the picture on a stacket widget.
one picture when the value goes to 0-40, other when it´s from 41-70 and the last from 71-100.
The only thing I have achive is change the image but one by one. Anyone can help me? I´ve give you the code of this:
wave++;
if(wave==1)
{
ui->VolumeSWWave_5->setCurrentIndex(1);
}
if(wave>1)
{
wave=0;
ui->VolumeSWWave_5->setCurrentIndex(0);
}
{
return;
for (int i = 0; i < 10; ++i)
qDebug("%1", i);
}
if(wave<1)
{
wave=0;
ui->VolumeSWWave_5->setCurrentIndex(2);
}
{
return;
for (int i = 0; i > 10; ++i)
qDebug("%1", i);
}
The QAbstractSlider has a signal (the actionTriggered(int)) if you "catch" that signal then you can in an if else block decide what picture is getting displayed: