16 #include <QVBoxLayout>
24 mDisplayLabel(new QLabel())
26 this->setToolTip(
"Preview of an image file");
27 mDisplayLabel->setAlignment(Qt::AlignCenter);
29 QVBoxLayout* layout =
new QVBoxLayout(
this);
31 layout->addWidget(mDisplayLabel);
41 mDisplayLabel->setFixedSize(width, height);
46 QString imageText =
"";
49 map.load(absoluteFilePath);
50 mDisplayLabel->setPixmap(map.scaled(mDisplayLabel->width(), mDisplayLabel->height(), Qt::KeepAspectRatio));
52 imageText =
"Image missing!";
54 mDisplayLabel->setText(imageText);