5

What is the recommended method of copying one QImage into another at a particular position in Qt4?

QImage::bitblt was removed in Qt4.

Does the QImage now need to be converted to a PixMap and back?

user408209
  • 119
  • 2
  • 3

2 Answers2

6

Use QPainter to draw to your image.

QPainter painter( &targetImage );

painter.drawImage( ... );
Tom Sirgedas
  • 3,208
  • 20
  • 17
4

From Qt Assistant: "Use copy() or QPainter::drawImage() instead."

  • See also [here for QT-4](http://harmattan-dev.nokia.com/docs/library/html/qt4/qpainter.html#drawImage) and [here for QT-5](http://qt-project.org/doc/qt-5.0/qpainter.html#drawImage). – Lenik Jun 21 '12 at 09:58