PDA

View Full Version : how to resize an image from URL according to the size of the widget on which it lies



qt_user
12th August 2010, 11:07
I have set an image on a widget('this' here) by the function......

this->setStyleSheet( "QFrame {background-color: black; background-image: url(:/images/background.png); background-repeat: no-repeat; border-color: gray;}");
I want this image to resize when the widget is resized.......... is it possible....if yes, how?

franz
13th August 2010, 06:33
Play around with the QWidget::resizeEvent() and the size of the image.