views:

69

answers:

0

The new animation framework in QT4 looks incredible. I'm trying to implement some simple widget animation in PyQt4, though I'm having errors.

        self.button = QtGui.QPushButton ("Hello", self)
    self.button.setGeometry (5, 10, 100, 25)

    animate = QtCore.QPropertyAnimation (self.button, "geometry")
    animate.setDuration (10000)
    animate.setStartValue (QtGui.QRect (0, 0, 100, 30))
    animate.setEndValue (QtGui.QRect (250, 250, 100, 30))

    animate.start()

I get module has no attribute 'QPropertyAnimation'. Are the animation classes not implemented? Is python too slow to handle such animation, hence the developers decided to leave it out?