JesperWe
10th February 2010, 17:51
I have a nice looking class inherited from QGraphicsItem that I use on my scene. Let's call an object of that class A
Some other items (B and C) of another class can have pointers (in the graphical sense, not the variable memory sense!) to A. I show this by drawing an arrow from B to A and from C to A, sort of like this:
B -> A <- C
When B and C are a long distance from each other I would like to instantiate another copy of A so that I can draw something like:
B->A
C->A
...but A can only be added once to the scene.
What is the smart way of solving this without making two copies of A that have to be modified simultaneously if they change?
Some other items (B and C) of another class can have pointers (in the graphical sense, not the variable memory sense!) to A. I show this by drawing an arrow from B to A and from C to A, sort of like this:
B -> A <- C
When B and C are a long distance from each other I would like to instantiate another copy of A so that I can draw something like:
B->A
C->A
...but A can only be added once to the scene.
What is the smart way of solving this without making two copies of A that have to be modified simultaneously if they change?