Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QGraphicsPixmapItem quality degraded when rotated
dporobic last edited by dporobic
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:
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:
What I have noticed is that rotating by 90°, 180°, 270° and 360° looks ok.
Any Ideas how to fix this?