Important: Please read the Qt Code of Conduct -

Sample code for rotating/resizing a QGraphicsLineItem on the QGraphicsScene.

  • Hi All,

    Can anybody please provide me guidance in implementing the rotating & resizing of a QGraphicsLineItem which is present on a QGraphicsScene. The objective is to rotate the QGraphicsLineItem using one point as an anchor around which we rotate the line on the scene.

    Similarly I want to resize the line by clicking on any of the two end points of line, and also taking into consideration bounding Rect of the QGarphicsScene.

  • I'm not QGraphics... expert.
    I've seen some examples in "Qt Graphics View Examples":

  • @andreyc : Thanks for the info. But I'm specifically looking for algorithm or code example to rotate and resize the QGraphicsLineItem on a graphic scene. I could not find the any example demonstrating what I require.

Log in to reply