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