I'm trying to create a scrolling effect for painting done in a QPixmap, using a function that takes a pixmap and paints it into itself with the required deltas:
Qt Code:
  1. void scrollGraphics(int dx, int dy, QPixmap *thePixmap)
  2. {
  3. p.begin(thePixmap);
  4. p.drawPixmap(dx, dy, *thePixmap);
  5. p.end();
  6. }
To copy to clipboard, switch view to plain text mode 

If dx and/or dy < 0, the graphics of thePixmap appear shifted by the correct amount. However, if I pass a value greater than 0 for dx and/or dy, drawPixmap() paints into thePixmap multiple shifted copies of itself.

Is this a Qt bug? Or am I missing something?