def __init__(self,prop): QVariantAnimation.__init__(self) self._property = prop self.startFromCurrent = True self.relative = False
def setDuration(self,value): # prevent setDuration from changing property's current value tmpval = self._property() # store the property's current value QVariantAnimation.setDuration(self,value) # undergo the normal process self._property.setTo(tmpval,update=False) # restore the property to the previous value
def setEndValue(self,value): # prevent setEndValue from changing property's current value tmpval = self._property() # store the property's current value QVariantAnimation.setEndValue(self,self._property.conversions[value.__class__](value)) # undergo the normal process self._property.setTo(tmpval,update=False) # restore the property to the previous value
def start(self, *args, **kwargs): # for debugging return QVariantAnimation.start(self, *args, **kwargs)