Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, March 2007
QGraphicsPathItem: Slow when scaling with children


Message 1 in thread

Hi,

I've been programming a GraphicsView application that contains a 
QGraphicsPathItem instance with ~9000 children in a horizontal row. Each such 
child contains two QPainterPath instances which are rendered in the child's 
paint() method. The parent of those 9000 items does not do any drawing by 
itself and is only responsible for vertical scaling.
The items are of such size that only ~20 are visible at a time in the 
GraphicsView.

The issue I am having is that when scaling, the framerate is very low, 
approximately around 2fps. If I reduce the number of children, the framerate 
increases, even though the same number of items is visible on screen as in 
the previous case.
It thus seems to me that the scaling is propagated to all children, even 
though they are not visible on screen. Is there any way to turn this off or 
otherwise improve performance?

Thanks.
-- 
 [ signature omitted ] 

Message 2 in thread

On Friday 09 March 2007 23:14, Markus wrote:
> The issue I am having is that when scaling, the framerate is very low,
> approximately around 2fps.
Figured it out. Qt was recreating the BSP tree after each transformation, so 
setting QGraphicsScene::NoIndex helped.

-- 
 [ signature omitted ]