Qt Line Drawing at Drawing

Qt Line Drawing. Press mouse button at start position and drag to end position. This will create the lines you see in qt designer.

QGraphicsPathItem example 5 Bezier quadratic lines with arrow heads
QGraphicsPathItem example 5 Bezier quadratic lines with arrow heads from www.richelbilderbeek.nl

For this function is overridden mousemoveevent in which two coordinates, the first of a past event, and the second from the current, red lines are being built, which eventually form a common curve. See also x and y. In qt 5.7 the code generated by qt designer for a horizontal line (which can be checked in the menu using form/view code.) is:

QGraphicsPathItem example 5 Bezier quadratic lines with arrow heads

You can then place this frame in your grid layout with the appropriate column span. The line has two bezier control points for changing its shape. See also x and y. Line = new qframe (form);