First:
QGraphicsItem *pnode = new QGraphicsItem[6376]
scene = new QGraphicsScene(0, 0, Xmax*VisZoom, Ymax*VisZoom);
To copy to clipboard, switch view to plain text mode
Then
add the 6376 items on the scene using:
scene->addItem(&pnode)
scene->addItem(&pnode)
To copy to clipboard, switch view to plain text mode
As shown below: each red spot represents an item
However, it becomes very slow if I want to change the size of the 6376 items simultaneously using: piNode[i].setScale. It will take about 30 seconds.
Moreover, even I use: void QGraphicsView::scale ( qreal sx, qreal sy ) to resize the whole scene, it still cost lots of time.
What's the problem? Can I speed up the program? Thanks a lot.
Bookmarks