Function declarations in the Qt help documentation:
void QPainter::drawImage ( const QRect & target, const QImage & image, const QRect & source, Qt::ImageConversionFlags flags = Qt::AutoColor )
Example: QRect target(10.0, 20.0, 80.0, 60.0); QRect source(0.0, 0.0, 70.0, 40.0); QImage image(“:/images/ myimage.png “); // Create a QImage object
QPainter painter(this); painter.drawImage(target, image, source); // Draw the image at (0.0, 0.0, 70.0, 40.0) positions in the source image file to (10.0, 20.0, 80.0, 60.0) positions in the target drawing device