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 select a part of an image with eight draggable points?

How to select a part of an image with eight draggable points?

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

    Excuse me, I use QRubberBand to select a part of an image like this one:
    http://imageshack.us/photo/my-images/40/qaxi.jpg/
    http://imageshack.us/photo/my-images/600/p58j.jpg/

    But I would like it to have eight draggable points within the edge so that the selected area can be resized, e.g.
    http://imageshack.us/photo/my-images/23/24qn.jpg/

    Please give me some tips, thank you so much!

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      you can go with QGraphicsView and add the pixmap in there.

      Then you sublass QGraphicsRectItem and add also graphics items (also QgraphicsRectItem's if you want) as child items and position them correctly.
      Then react on the mouse events in that child items and resize the parent rect item accordingly. The code to do that shouldn't be that complicated.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      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