Hi,
I creat a label and add a image to pixmap of label:
#include "mainwindow.h"
#include <QtGui>
MainWindow::MainWindow(QWidget *parent) :
QWidget(parent)
{
QHBoxLayout *lay=new QHBoxLayout;
setLayout(lay);
QImage image("comando.jpg");
QLabel *imageLabel = new QLabel(this);
lay->addWidget(imageLabel);
imageLabel->setPixmap(QPixmap::fromImage(image));
}
MainWindow::~MainWindow()
{
}
and now i want to resize the image. I want set a size to the label like 200*200 and resize the image to it.
Bookmarks