I'm trying to learn the Qt Animation Framework from python by porting the 
folowing code found at http://doc.trolltech.com/4.6/animation-overview.html :


QPushButton button("Animated Button");
button.show();

QPropertyAnimation animation(&button, "geometry");
animation.setDuration(10000);
animation.setStartValue(QRect(0, 0, 100, 30));
animation.setEndValue(QRect(250, 250, 100, 30));

animation.start();


The result I've come up with is:

import sys
from PySide.QtCore import *
from PySide.QtGui import *


app = QApplication(sys.argv)

button = QPushButton("Animated Button")
button.show()

animation = QPropertyAnimation(button, "geometry")
animation.setDuration(10000)
animation.setStartValue(QRect(0, 0, 100, 30))
animation.setEndValue(QRect(250, 250, 100, 30))


app.exec_()

However, this code produces the following errors:

Traceback (most recent call last):
  File "test.py", line 13, in <module>
    animation.setStartValue("0, 0, 100, 30")
Boost.Python.ArgumentError: Python argument types in
    QVariantAnimation.setStartValue(QPropertyAnimation, str)
did not match C++ signature:n Fr
    setStartValue(QVariantAnimation {lvalue}, QVariant)

While I vaguely understand what the error is saying, I haven't the slightest 
clue how to fix it. Any hints are more than welcome.

Thanks in advance,
Aspidites

PS - I'm running this code via ssh to my N900.
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to