[Qt-interest] Move lot of QGraphicsItem or scrol the QGraphicsView ?

mario dodiesis at gmail.com
Wed Jul 7 18:44:42 CEST 2010


Hi all,

I'm on an embedded device with wince6.
I have a lot of QGraphicsItem (some sort of rounded rectangle with 2
text QGraphicsTextItem inside) to move at the same time.

The view is sized to show only a subset of them ( 20 of 100 ) and they
are all aligned horizontally.

At the first time I tried to resize the scene to cover all of them and
I used the QgraphicsView's scrollbars, but it was too slow.

So I resized the scene to the same size of the view, I grouped all the
items in a QGraphicsItemGroup and set the movable flag on it. So I
could move it with the mouse.
Even this was too slow.

Which of them is the right way?
I can try to improve the code, but I need to know which is the best
method (in performance speaking).
Any hints?
tnx

-- 
Mario Signorino | www.sgrunt.net



More information about the Qt-interest-old mailing list