Furthermore you are creating new timers there each time you draw the scene. Which means a memory consumption and possibly wacky results. paintGL() is meant to paint the scene and only paint the scene, nothing more. No counting, no creating objects -- just painting. I think I already suggested in some other thread that you use a QPropertyAnimation instead of a timer. Please consider that, you'll get code that is predictable. In contrast your current code is not -- try to think what happens when you start resizing the window very quickly.
Bookmarks