You should scale QPixmap. This function has methods scaledToWidth and scaledToHeight
QPixmap QPixmap::scaledToWidth(int width, Qt::TransformationMode mode = Qt::FastTransformation) const
Returns a scaled copy of the image. The returned image is scaled to the given width using the specified transformation mode. The height of the pixmap is automatically calculated so that the aspect ratio of the pixmap is preserved.
If width is 0 or negative, a null pixmap is returned.
You should scale QPixmap. This function has methods scaledToWidth and scaledToHeight
Scale the image before drawing
Is the
QPainter painter(this)
in yourthis
here the window of yourwuziqi
?Your qipan control does not cover the entire window...