i cant see the images
Widget.h
Widget.h
QLabel *label;
To copy to clipboard, switch view to plain text mode
widget.cpp
ui(new Ui::Widget)
{
}
widget.cpp
Widget::Widget(QWidget *parent) :
QWidget(parent),
ui(new Ui::Widget)
{
label = new QLabel(this);
}
To copy to clipboard, switch view to plain text mode
void Widget::displayimages()
{
ImageToLoad.load(dir.absoluteFilePath(dirList.value(localimage)));
label
->setPixmap
(QPixmap::fromImage(ImageToLoad.
scaled( 1025,
1025,Qt
::KeepAspectRatio)));
label->show();
}
void Widget::displayimages()
{
ImageToLoad.load(dir.absoluteFilePath(dirList.value(localimage)));
label->setPixmap(QPixmap::fromImage(ImageToLoad.scaled( 1025,1025,Qt::KeepAspectRatio)));
label->show();
}
To copy to clipboard, switch view to plain text mode
[/code]
as you said i reusing the label bt i cant see the images
Originally Posted by
wysota
Again, reuse an existing label instead of creating a new one for each image.
Bookmarks