Hi . my code is
back.load(":/images/back.png");
label->setGeometry(0,0,142,192);
label->setPixmap(back);
setStyleSheet("background-color:red"); // so far so good
// but i want to change size pixmap after load (for example onclick event)
label
->pixmap
()->scaled
(QSize(100,
297));
label->repaint();
// noting change size with or another
back.load(":/images/back.png");
label = new QLabel(this);
label->setGeometry(0,0,142,192);
label->setPixmap(back);
setStyleSheet("background-color:red"); // so far so good
// but i want to change size pixmap after load (for example onclick event)
label->pixmap()->scaled(QSize(100, 297));
label->repaint();
// noting change size with or another
To copy to clipboard, switch view to plain text mode
I wantto change pixmap width after loading in label , because I use two pixmap for one label. I want to the pixmap of label inside to change , Whichever it can. I mean , what's inside pixmap that moment
in other words, I want to change size which pixmap is present in the label, without knowing what pixmap is...
Bookmarks