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

Not detecting QGraphicsItem::mouseReleaseEvent [SOLVED]



  • @void Circle::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
    {
    qDebug()<<"released";
    update();
    QGraphicsItem::mouseReleaseEvent(event);
    }@

    in the constructor when i use

    @setFlag(ItemIsMovable);@

    mouseReleaseEvent gets triggered

    but when i use

    @setFlag(ItemIsMovable,false);@

    mouseReleaseEvent doesn't get triggered and i get nothing

    i solved it by just addeing @setFlag(ItemIsSelectable);@


Log in to reply