Is there a way to resize the canvas of a QPixmap
, similar to how an image editor does it - by padding and clipping the image as necessary, but not scaling it?
If not, I assume I should create a new (compatible) QPixmap
, and use QPainter::drawPixmap() to place the original image appropriately.
No, there is no such option. You need to create another pixmap and use drawPixmap
as you said.