Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Can I resize the image before drawing?
QImage img1; img1.load(filename); img1.scaled(width1, height1).scaled(width1, height1, Qt::IgnoreAspectRatio,Qt::SmoothTransformation); draw.drawImage(250,80, img1);
It does not work.
===================== solved by myself. QPainter::scale()
Hi,
scaled returns a new QImage so it should be:
@QImage img2 = img1.scaled(width1, height1); draw.drawImage(250, 80, img2);@