Important: Please read the Qt Code of Conduct -

Error in getting QGraphicsItem's coords for mouse events

  • I add several QPainterPath-s to my graphics view and then use setPos() to place them in the right place on my view. But in mousePressEvent, when I use the following code:

    @if (textPath->contains(e->posF())) {
    // do something

    it always returns false. How do I fix this?

Log in to reply