Quote Originally Posted by wysota View Post
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.
Thanks for the suggestion but is it possible to gave me a quick example on how i can change to a QPropertyAnimation? i've read the documentation but still could not really understand as i'm very new to programming. Or is there anyway i could just add some constraints to my counter in my mouseEvent to make it work?