PDA

View Full Version : QGraphicsScene / QGraphicsView speed after resize



themolecule
21st July 2007, 22:56
I have a strange bug...

I am writing an app based on the chip example...

at some point during development, I noticed that my graphicsscene was getting a little slow. I now realize that it is only slow after I resize the window. I have hardcoded the opengl mode to on by manually toggling the opengl button and hiding it. the scene is fast before a resize, and slow after. I have stripped all the additional graphicsitems out to the most simple rectangles, so I'm fairly certain it's not just the number of items.

a clue here is that after resizing, moving an item with the hand drag mode causes the whole view to jump exactly the amount I resized (ie, if I resize the window +10px in x and y, after dragging an item the whole scene jumps down+right by 10px).

it seems that something in the resize event is not happening, which is causing slowness.

if I toggle the opengl button after resizing, the non-opengl is fast again, but opengl is still slow.

It's wierd... the initial window size is fast in opengl, but other sizes are slow. also, creating the mainwindow and showing with showMaximized does not fix it. only the initial size is fast.

any ideas?

marcel
21st July 2007, 23:46
I can't reproduce that here, running Qt 4.3 on Windows Xp.
I tried with the 40000 Chips demo. It works resized as well as it works at the initial dimensions.



it seems that something in the resize event is not happening, which is causing slowness.
Did you write your custom resize event?


What kind of updates do you do on the view on how often?

Regards