PDA

View Full Version : QGraphicsItem setPos



bunjee
4th October 2009, 19:06
Hey guys,

I'm coding a light QGraphicsScene based file browser.

I have 10 000 QGraphicsItem inside my QGraphicsScene.

I'm doing a setPos on the 10 000 items at once.
This is quite slow.

What's the fastest way to apply a setPos to 10 000 items ?

Can I disable the scene's update to perform it faster or something ?

Thanks.

lni
5th October 2009, 02:38
Do all setPos before put scene into view....

Lykurg
5th October 2009, 12:04
You can use QGraphicsView::NoViewportUpdate on your view before setting the positions and then change back.

scascio
5th October 2009, 13:29
What is the difference with QWidget::setUpdatesEnabled ?