eltecprogetti
29th February 2012, 18:08
I need to display jpeg images, and I thought about using a QLabel.
While I designed the label in the form, I loaded the pixmap property with a jpeg file, and the image is displayed immediately in the form in design phase.
But when I start the application, the label is blank and I don't see the jpeg image.
I added a button and when I click on the button reloading the file with these instructions:
ui->label->setPixmap(QPixmap("presentation.jpg"));
ui->label->show();
The file "presentation.jpg" is present in the source directory and also in subfolders "Debug" and "Release".
Unfortunately I don't see the jpg image on my label.
Help, please..........
While I designed the label in the form, I loaded the pixmap property with a jpeg file, and the image is displayed immediately in the form in design phase.
But when I start the application, the label is blank and I don't see the jpeg image.
I added a button and when I click on the button reloading the file with these instructions:
ui->label->setPixmap(QPixmap("presentation.jpg"));
ui->label->show();
The file "presentation.jpg" is present in the source directory and also in subfolders "Debug" and "Release".
Unfortunately I don't see the jpg image on my label.
Help, please..........