第二个问题
QImage QImage::copy ( const QRect & rectangle = QRect() ) const
Returns a sub-area of the image as a new image.
The returned image is copied from the position (rectangle.x(), rectangle.y()) in this image, and will always have the size of the given rectangle.
In areas beyond this image, pixels are set to 0. For 32-bit RGB images, this means black; for 32-bit ARGB images, this means transparent black; for 8-bit images, this means the color with index 0 in the color table which can be anything; for 1-bit images, this means Qt::color0.
If the given rectangle is a null rectangle the entire image is copied.
See also QImage().
QImage QImage::copy ( int x, int y, int width, int height ) const
This is an overloaded function.
The returned image is copied from the position (x, y) in this image, and will always have the given width and height. In areas beyond this image, pixels are set to 0.
直接搬的助手原话