Unsolved QGraphicsPixmapItem quality degraded when rotated
-
Does anyone know why a quality of a QGraphicsPixmapItem degrades after rotating it?
This is the original image:
This one is rotated by just 1°:
So far I have tried setting the TransformationMode:
setTransformationMode(Qt::SmoothTransformation);
And painting it manually:
painter->setRenderHints( QPainter::Antialiasing | QPainter::SmoothPixmapTransform ); painter->drawPixmap( boundingRect().topLeft(), myOriginalPixmap );
Without any noticeably change there.
This is how the rotation is done:
auto center = boundingRect().center(); auto transform = this->transform(); transform.translate(center.x(), center.y()); transform.rotate(angel); transform.translate(-center.x(), -center.y()); setTransform(transform);
I have also tried rotating with this, but the effect was the same:
setRotation(angel);
What I have noticed is that rotating by 90°, 180°, 270° and 360° looks ok.
Any Ideas how to fix this?