Important: Please read the Qt Code of Conduct -

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:


    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.translate(-center.x(), -center.y());

    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?

Log in to reply