1

I am trying to set easing curve for controlling animation of a simple frame

    self.animation = QPropertyAnimation(self.frame, b'minimumWidth')
    self.animation.setDuration(100)
    self.animation.setStartValue(150)
    self.animation.setEndValue(300)
    self.animation.setEasingCurve(QtCore.QEasingCurve.InOutQuad)
    self.animation.start()

But I get this error:

AttributeError: type object 'QEasingCurve' has no attribute 'InOutQuad'

I tried other curve options Linear, InQuad, OutQuad, all gives same error, Please Help.

Jack Zero
  • 77
  • 6
  • 1
    PyQt6 has changed the way flags/enums are accessible. In your case, it should be `QtCore.QEasingCurve.Type.InOutQuad`. – musicamante Jun 25 '21 at 16:57
  • Thanks once again Maurizio for pointing out the changes, problem solved, You did help me once before with another question too! – Jack Zero Jun 25 '21 at 18:02

0 Answers0