Hi all,
I got some problem using pyinstaller with pyQT and Qvariant .
I use eric as my ide for developing my opensource application and I do not have any trouble when I use the source code from there. when I compile it with pyInstaller all the qvariant object gives me an error .
for example:
I have a derived class from QGraphicsItem that ovverwrite a method :.itemChange from the qt documentation as you can see below this method have a QVariant attribute. Variant QGraphicsItem.itemChange (/self/,GraphicsItemChange <http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsitem.html#GraphicsItemChange-enum>, QVariant)

this is my code:
Old code that work with eric and give me trouble after compiling

 def itemChange(self, change, value):
        if change == QtGui.QGraphicsItem.ItemSelectedChange:
selected, spool=value.toUInt() *# <----- here the code fails on toUint() .. said that the method toUint cant be apply on int *
            selected, spool=value
            self.setColor(selected==True)
            self.update(self.boundingRect())
        return QtGui.QGraphicsItem.itemChange(self, change, value)

and this is the code that work with pyInstaller/eric now

 def itemChange(self, change, value):
        if change == QtGui.QGraphicsItem.ItemSelectedChange:
            self.setColor(value==1)
            self.update(self.boundingRect())
        return QtGui.QGraphicsItem.itemChange(self, change, value)

I got this problem even in other part of the program related to Qvariant ..
any Idea Help ?

Regards,
Matteo

--
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.

Reply via email to