Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Best way to graphic segments
Forum Updated to NodeBB v4.3 + New Features

Best way to graphic segments

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 885 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    turkoz14
    wrote on last edited by
    #1

    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:
    0_1519074647650_segment.png

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

    0_1519074752720_segmentOK.png

    any ideas ? thanks in advice.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • T Offline
        T Offline
        turkoz14
        wrote on last edited by
        #3

        Thanks for the quick response would check that.
        Cheers.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved