Quote Originally Posted by bnilsson View Post
I am not there yet, this will be the next version.
In the current version, the only QGraphicsitems are the fields, and the content is drawn by painter calls.
That's not very efficient.

This is what I do. Could you suggest an alternative way, without this effect?
Try changing the order of commands or use a debugger to see why the second redraw is made.

Any (performance-wise) preferred way to draw filled surfaces?
Avoid complex shapes. Use levelOfDetail.

Quote Originally Posted by bnilsson View Post
I have now made a first attempt to make a parent-child hierarchy implementation.
I am doing something like this:

Qt Code:
  1. Field = new QGraphicsRectItem(outRect);
  2. .
  3. .
  4. SubField = new QGraphicsRectItem(outRect, Field);
  5. .
  6. .
  7. XRect = new QGraphicsRectItem(outRect, SubField);
To copy to clipboard, switch view to plain text mode 
The result is using a remarkably small amount of memory, but the drawing performance is extremely poor, both compared to the "flat" item strategy. Why?
Do you mean you pass the same rectangle to the three items? I don't think this is a correct approach. And using custom items you might obtain better speed - use level of detail and modifies shapes and parameters like antialiasing.

Another observation is that I used exactly the same placement calculations as for the "flat" version, and I expected that it all should turn out a mess since the child item should use the origin of its parent, not the global chip origin. Yet it worked the first time, which tell me I don't really understand how this works.
Take a closer look at the "dragdroprobot" example - see how the robot is drawn.

Quote Originally Posted by Gopala Krishna View Post
@Wysota: Am i wrong with the above assumption as you suggested the child items option ?
No, you are right.