PDA

View Full Version : Graphics view framework resize shape capability



brcain
5th November 2013, 22:16
Hello,

Thanks much for your time!

Is there a way to add the ability to edit the size of a QGraphicsItem such as you can with the selection and moving capability?
I wish there was a way to add QGraphicsItem::ItemIsResizable to:


QGraphicsItem * item;
// ...
item->setFlags(QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemIsMovable | ...);
Is the intent for Qt to eventually provide this capability to their framework?

For now, is it required to roll your own resize controls ... even for standard shapes?

Thanks much,
Ben

kamre
5th November 2013, 22:55
Is the intent for Qt to eventually provide this capability to their framework?
Look at this (http://qt-project.org/wiki/Qt_Modules_Maturity_Level):

Graphics View

State: Done
Reasoning: stable code for which stability and reduced risk of regressions is more important; we don’t plan on adding more features.

brcain
6th November 2013, 00:17
I'm trying to leverage the graphics framework to its fullest extent.

Below is a snapshot of a custom shape that I have in a QGraphicsScene. What is the proper way to implement the controls to change size and rotate the shape?

In the image are two vertices (upper-left/lower-right) for controlling the size and one for controlling the orientation (top-center) of the custom shape. What's the best approach to implement this behavior?

9757