Important: Please read the Qt Code of Conduct -

QtPixmapItem tears after rotation

  • Hi.
    I created a QGraphicsPixmapItem subclass called "Lshape". Now in the constructor I set a pixmap from a resource file. Now I want to rotate it:
    @ if (event->key() == Qt::Key_Left)

    TransfPoint returns the center of the shape:
    @ if (type%2==0) return QPointF((x()+300)/2,(y()+200)/2);
    else return QPointF((x()+200)/2,(y()+300)/2);@

    The thing is, after rotating, if you drag the image it tears and I don't know why.

    Hope you can help me. Thanks.

Log in to reply