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. how to move a line with the mouse on a drawing created with QGraphicsView

how to move a line with the mouse on a drawing created with QGraphicsView

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 268 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.
  • D Offline
    D Offline
    Domenico
    wrote on last edited by
    #1

    Hi everyone,

    I would like to implement codes that allow you to move a line or a rectangle with the mouse on a drawing created with QGraphicsView, is there any small example? doing the search I can't find it or maybe I missed it, can you help me?

    I repeat, I mean codes that allow you to move a line or rectangle with the mouse on a created drawing, I don't mean to create a line or rectangle with the mouse but to move with the mouse.

    thank you so much for those who help me

    Pl45m4P 1 Reply Last reply
    0
    • D Domenico

      Hi everyone,

      I would like to implement codes that allow you to move a line or a rectangle with the mouse on a drawing created with QGraphicsView, is there any small example? doing the search I can't find it or maybe I missed it, can you help me?

      I repeat, I mean codes that allow you to move a line or rectangle with the mouse on a created drawing, I don't mean to create a line or rectangle with the mouse but to move with the mouse.

      thank you so much for those who help me

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

      @Domenico

      Set the flags QGraphicsItem::ItemIsMovable and QGraphicsItem::ItemIsSelectable, then you can click your item and move it around.


      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
      2

      • Login

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