PDA

View Full Version : Having problem with QGraphicsItem



Kingofhearts_sri
21st January 2009, 06:21
Hi,
I have reimplemented the diagramscene example in Qt4.4 for my requirement. I have used same class and same menu items and i have my own class for different diagrams and their own menu items.
As in the example the user need to select diagram(process box, conditional box...) from the toolbox and place it on the scene by mouse click. If the user want to name that diagram user need to select text tool from the toolbox,then write the text for that particular item.
I want to combine both QGraphicsPolygonItem and QGraphicsTextItem and create a new QGraphicsItem so that when ever the user select a particular Item from toolbox and click on scene then the user need to give provision to enter text for that Item then and there itself he need not go and again select the text tool for entering text.
Hope u understood my problem, how to achieve this take what methods to use plz suggest me.
thank you,
with regards,
sri.

Kingofhearts_sri
23rd January 2009, 05:44
How to do this is there is no way for it. somebody help me.

jpn
23rd January 2009, 16:19
Don't you already have the necessary code in the example application? You just need to combine the two cases.

Kingofhearts_sri
23rd January 2009, 17:53
Ya I know that but can u give hint how to combine these cases.

jpn
23rd January 2009, 19:10
Ya I know that but can u give hint how to combine these cases.
Perhaps you should try to show some interest in solving the problem? Currently it doesn't feel much like that. What have you done so far? Did you take a look at the code? Did you take a look at the documentation which explains the code almost line by line?