Have you read the documentation about the animation framework, especially "Animations and the Graphics View Framework"? Have you subclasses the rect item and inherit QObject?