Quote Originally Posted by kiranraj View Post
Could any one help me in knowing how QGraphicsView is better than QCanvas (Qt3.3.6).
As Johan mentioned, it has many advantages. It's more scalable (QCanvas was designed to hold thousands of items, QGraphicsScene can easily handle even a milion items without a major slowdown), easier to handle thanks to the use of local coordinate systems for each item, has more capabilities - for example each item can handle events passed to it and many more. Most of it is mentioned in the docs.

But i would like to know how it is better than the
Chunks concept used in Qt3 in terms of space and time wise..
In most cases it is better. For other cases (when you have many moving items that would have to be constantly moved between leaves of the tree) you can turn off BSP indexing.


Quote Originally Posted by kiranraj View Post
I know that searching items on the canvas takes O( log n) ...
But what about the space complexity ....?
QGraphicsItem uses not more than several bytes of RAM as most data has been moved to more specialised classes (for example animation support was moved to QGraphicsItemAnimation), that's why it's more scalable than QCanvas.

If you're in doubt whether you should use QCanvas or switch to Qt4 and use QGraphicsView framework then in 99.9% of cases you should do the latter.