aboutsummaryrefslogtreecommitdiffstats
path: root/examples/widgets/animation/states/states.py
diff options
context:
space:
mode:
authorFriedemann Kleint <[email protected]>2021-01-26 08:40:30 +0100
committerFriedemann Kleint <[email protected]>2021-01-26 11:20:26 +0100
commit019ab0d2388e30def0cb982c14e011af119d2409 (patch)
treecc34379c3114f67fcbe2477cb7c5294c17c6fa50 /examples/widgets/animation/states/states.py
parentf2e3e8d8d34c93dc8e61d0efd01a59f542abd94c (diff)
PySide6: Re-add QStateMachine
The code was moved from QtCore into a separate library, QStateMachine, within the qtscxml repository. Re-add tests and fix examples. Task-number: PYSIDE-904 Task-number: PYSIDE-1482 Change-Id: I977b4835b3345fb342c369e4fdd92646118f7fda Reviewed-by: Cristian Maureira-Fredes <[email protected]>
Diffstat (limited to 'examples/widgets/animation/states/states.py')
-rw-r--r--examples/widgets/animation/states/states.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/widgets/animation/states/states.py b/examples/widgets/animation/states/states.py
index 363b5af6c..77c76bd9e 100644
--- a/examples/widgets/animation/states/states.py
+++ b/examples/widgets/animation/states/states.py
@@ -2,7 +2,7 @@
#############################################################################
##
## Copyright (C) 2010 Riverbank Computing Limited.
-## Copyright (C) 2016 The Qt Company Ltd.
+## Copyright (C) 2021 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing/
##
## This file is part of the Qt for Python examples of the Qt Toolkit.
@@ -40,7 +40,7 @@
##
#############################################################################
-from PySide6 import QtCore, QtGui, QtWidgets
+from PySide6 import QtCore, QtGui, QtStateMachine, QtWidgets
import states_rc
@@ -116,10 +116,10 @@ if __name__ == '__main__':
scene.addItem(p5)
scene.addItem(p6)
- machine = QtCore.QStateMachine()
- state1 = QtCore.QState(machine)
- state2 = QtCore.QState(machine)
- state3 = QtCore.QState(machine)
+ machine = QtStateMachine.QStateMachine()
+ state1 = QtStateMachine.QState(machine)
+ state2 = QtStateMachine.QState(machine)
+ state3 = QtStateMachine.QState(machine)
machine.setInitialState(state1)
# State 1.