Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to rotate and change location of a png in GraphicsView



  • hi i have to create hand motion animation but not advanced

    just rotate and change location by small distance in loop is enough

    but i dont have any idea please help my code is here:

    @
    QPixmap kineticPix(":/images/sup1.png");
    Pixmap *item = new Pixmap(kineticPix);
    item->setOffset(-kineticPix.width()/2, -kineticPix.height()/2);
    scene->clear();
    scene->addItem(item);
    @

    how to rotate and change location only picture not whole background ? because i have background picture too.. that should not be changed or rotated.

    [edit: added missing coding tags @ SGaist]


Log in to reply