[PyQt] Setting QVariant properties in construction

Jeremy Sanders jeremy at jeremysanders.net
Sat Oct 8 15:33:12 BST 2011


Hi - is this code supposed to work?

w = QWidget()
a = QPropertyAnimation(w, "maximumWidth", duration=1000, 
endValue=QVariant(1000))

TypeError: unable to convert a Python 'QVariant' object to a C++ 'QVariant' 
instance

This is PyQt 4.8.3.

Jeremy

-- 
http://www.jeremysanders.net/



More information about the PyQt mailing list