Best way to graphic segments

  • Hi im new developing on Qt and im working on a project that i need to draw segments, now im using a qlabel and drawing the segments with DrawLine() function. The problem is that segments are too small for example if a create two lines with this coordinates: (1,1)(3,3) and (1,3)(2,1) i cant see them so i have to multiply them per 10 for example to see them so they would be like this : (10,10)(30,30) and (10,30)(20,10). Also i realise that when i draw the segments they are draw in wrong direction like if the (0,0) coordinate is on the left upper corner.
    So the questiion is if anyone know how is the best practice to draw segments or the best way to graphic them.

    I attached an image with a (10,10)(30,30) segment on it:

    i'm looking to develop somethign like this to show the segments:


    any ideas ? thanks in advice.

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Take a look at the Coordinate System chapter of Qt's documentation for more information about that matter.

    You might also be interested by the Graphics View Framework.

  • Thanks for the quick response would check that.

Log in to reply