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. drawing a cuboid over a part of the image using a "mouse"
Forum Updated to NodeBB v4.3 + New Features

drawing a cuboid over a part of the image using a "mouse"

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 907 Views 3 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.
  • D Offline
    D Offline
    duddal_
    wrote on last edited by
    #1

    Hello,

    I am developing a tool which requires the user to draw the cuboid over a certain part of the image by using the Mouse. I know how to draw a rectangle using the mouse using QPainter. But I am unable to figure out how to draw a 3D rectangle (Cuboid).
    I want to draw multiple cuboids in the image and save the coordinates of the cuboid as a json file.

    I would really appreciate your guidance with this.

    Thank You.

    Pl45m4P 1 Reply Last reply
    0
    • D duddal_

      Hello,

      I am developing a tool which requires the user to draw the cuboid over a certain part of the image by using the Mouse. I know how to draw a rectangle using the mouse using QPainter. But I am unable to figure out how to draw a 3D rectangle (Cuboid).
      I want to draw multiple cuboids in the image and save the coordinates of the cuboid as a json file.

      I would really appreciate your guidance with this.

      Thank You.

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @duddal_

      How do you want to draw a 3D figure on an image?! 2D images don't have z-coordinates.

      To save 3D coords, you'll need a 3D environment.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      1
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        You mean something like this over the image ?
        alt text

        D 1 Reply Last reply
        0
        • mrjjM mrjj

          Hi
          You mean something like this over the image ?
          alt text

          D Offline
          D Offline
          duddal_
          wrote on last edited by
          #4

          @mrjj
          Yes, exactlly

          1 Reply Last reply
          0
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi
            well you could let the user first drag draw the back of the
            cuboid and then when he releases the mouse, he can then
            adjust the depth of the box.
            You just draw it in fixed angles like this drawing.
            But it wont be true 3d. just 2d that looks 3d.

            1 Reply Last reply
            2

            • Login

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