Important: Please read the Qt Code of Conduct -

QGraphicsScene and QGraphicsLineItem Problem

  • Hey Everyone,

    I've followed the Tutorial (link below) of QGraphicsScene and everything works fine.

    Now I've drawn several lines on the scene. When I select one of them, how can I trace back the draw information. I mean the positions of two points. What I wanna do is, when I select the line, I can change its orientation or length with mouse click.

    Thanks in advance
    Best Regards

  • First, when the item is selected, you can use
    to determine it's actually a line item. With that line item, you can now access and modify the line() property.

Log in to reply