[PyQt] TypeError: unable to convert a QVariant

Jason H scorp1us at yahoo.com
Thu Jul 23 16:37:30 BST 2009


TypeError: unable to convert a QVariant of type 6 to a QMetaType of type 12738896

I have that error message. I have python-defined class that provides a property as:

class X (QObject):
    ....
     xScale = pyqtProperty("double", getScaleX, setScaleX)

then Qt tries to update the property value using a QVariant. According to QMetaType.typeName(12738896) the type is "None", but this meta type number changes every time I run the script.

How can I fix this so either the conversion is not needed or it can happen? 

Thanks

Using PyQt 4.5.2-snapshot 


      


More information about the PyQt mailing list