
Originally Posted by
anda_skoa
The general approach sounds right.
Do you have any code already that we could look at to determine where it goes wrong?
E.g. the slot that is connected tot the change signal?
Cheers,
_
yes, this is my code.
void FindPeaks::on_nib_valueChanged(int value)
{
currImg = value+1;
ui->currentimgnumber->setText(tmpn); //show the current number of image on the label currentimgnumber.
ui->originalimg->clear(); // originalimg is a label I want to show image on.
ui
->originalimg
->setPixmap
(QPixmap::fromImage(qimgset
[value
]));
//qimgset is a vector that QImages were inside. ui->originalimg->repaint();
ui->originalimg->show();
}
void FindPeaks::on_nib_valueChanged(int value)
{
currImg = value+1;
QString tmpn = QString::number(currImg);
ui->currentimgnumber->setText(tmpn); //show the current number of image on the label currentimgnumber.
ui->originalimg->clear(); // originalimg is a label I want to show image on.
ui->originalimg->setPixmap(QPixmap::fromImage(qimgset[value])); //qimgset is a vector that QImages were inside.
ui->originalimg->repaint();
ui->originalimg->show();
}
To copy to clipboard, switch view to plain text mode
Bookmarks