QLabel->setPixmap scalable
-
@ MyLabel = new QLabel(ui->widget);
MyLabel->setGeometry(QRect(0, 0, 336, 425));
MyLabel->setPixmap(QPixmap(":/logo.jpg"));@How to make under that window is resized the QLabel image is also resized? Do not crop, resize proportionally.
-
The function scaled() should help you:
@
MyLabel->setPixmap(QPixmap(":/logo.jpg").scaled(...));
@The parameters of the function scaled() can be found here:
http://qt-project.org/doc/qt-4.8/qpixmap.html#scaled