I have a QGraphicsPixmapItem in a QGraphicsScene which I then zoom into and rotate in a QGraphicsView. Everything works great if there is no rotation or if I don't zoom in too far, however when I am zoomed way in (pixels are very visible) and rotate around strange things occur. Some of the time the image looks as I would expect, some of time the pixmap disappears (partially or completely), and some of the time horizontal gradients appear on the image (they remain horizontal even while the image rotates).
The first image is of a chart (there should be no color gradients) with a separate grid (collection of lines) imposed over it. The second image comes from my minimal example (below) and shows the pixmap partially missing (the shot is far away from the edge of the pixmap).
The following is a simple example which demonstrates most of what I am seeing.
class View : public QGraphicsView
explicit View(QWidget *parent = 0) :
QGraphicsPixmapItem *pixmapItem = new QGraphicsPixmapItem(QPixmap(":/images/chart.png"));
QGraphicsScene *scene = new QGraphicsScene();
void wheelEvent(QWheelEvent *event)
if(event->delta() > 0)
void keyPressEvent(QKeyEvent *event)
if(event->key() == Qt::Key_Left)
else if(event->key() == Qt::Key_Right)
#endif // VIEW_H
It appears that this may have something to do with a limitation of x11. Basically once a large enough zoom is hit the max size value is hit.
I'm still not entirely sure why rotation appears to effect things but as a conjecture it could be because it is related to the size of the bounding rect of the image which will vary at different angles. The gradients I have seen are also odd as well as the image only partially disappearing, but it seems likely that they are all related and this is another manifestation.