سؤال

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top