diff options
author | Friedemann Kleint <[email protected]> | 2021-01-26 08:40:30 +0100 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2021-01-26 11:20:26 +0100 |
commit | 019ab0d2388e30def0cb982c14e011af119d2409 (patch) | |
tree | cc34379c3114f67fcbe2477cb7c5294c17c6fa50 /examples/widgets/state-machine/trafficlight.py | |
parent | f2e3e8d8d34c93dc8e61d0efd01a59f542abd94c (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/state-machine/trafficlight.py')
-rw-r--r-- | examples/widgets/state-machine/trafficlight.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/widgets/state-machine/trafficlight.py b/examples/widgets/state-machine/trafficlight.py index 4aa8d560e..3631fdbbb 100644 --- a/examples/widgets/state-machine/trafficlight.py +++ b/examples/widgets/state-machine/trafficlight.py @@ -43,6 +43,8 @@ from PySide6.QtWidgets import * from PySide6.QtGui import * from PySide6.QtCore import * +from PySide6.QtStateMachine import QFinalState, QState, QStateMachine + class LightWidget(QWidget): def __init__(self, color): @@ -83,7 +85,7 @@ class TrafficLightWidget(QWidget): self.greenLight = LightWidget(Qt.green) vbox.addWidget(self.greenLight) pal = QPalette() - pal.setColor(QPalette.Background, Qt.black) + pal.setColor(QPalette.Window, Qt.black) self.setPalette(pal) self.setAutoFillBackground(True) |