On Fri, 9 Apr 2010 22:44:05 +0200, Philippe Crave <[email protected]> wrote: > Hi, > > in a QGraphicsObject, I use a StateMachine. > I have problem using assignProperty. > I am sure to enter that State, but, it does not change my Class property. > > this how I assign the property > self.state_in.assignProperty(self, "alpha", 0) > > and here is how I define the property in the Class > def get_alpha(self): > print 'get' > return self._alpha > def set_alpha(self, v): > print 'set' > self.setOpacity(v) > self._alpha = v > alpha=property(get_alpha, set_alpha) > > What am I doing wrong ?
Python properties and Qt properties are different things. Try using pyqtProperty() instead of property(). Phil _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
