aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-08 15:37:15 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-08 14:24:28 +0000
commit1a66d7be29902fc041fe53ef280c237d3c3f216b (patch)
tree2aa1308203300994f7e3a3a1414f2fa1ba1e24f7 /examples
parent00fa3966dbed373e341710f1145fd23a88f1bdb0 (diff)
Fix some examples to run with Qt 6
Task-number: PYSIDE-841 Task-number: PYSIDE-1339 Task-number: PYSIDE-904 Change-Id: Ide9c869d73d14c56c06e39c0e2447761595978c9 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/tutorial/t14.py6
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py3
2 files changed, 5 insertions, 4 deletions
diff --git a/examples/tutorial/t14.py b/examples/tutorial/t14.py
index 0fcfa74c4..9096188b7 100644
--- a/examples/tutorial/t14.py
+++ b/examples/tutorial/t14.py
@@ -377,11 +377,11 @@ class GameBoard(QtWidgets.QWidget):
hitsLabel = QtWidgets.QLabel("HITS")
shotsLeftLabel = QtWidgets.QLabel("SHOTS LEFT")
- QtWidgets.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_Enter),
+ QtGui.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_Enter),
self, self.fire)
- QtWidgets.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_Return),
+ QtGui.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_Return),
self, self.fire)
- QtWidgets.QShortcut(QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_Q),
+ QtGui.QShortcut(QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_Q),
self, QtCore.SLOT("close()"))
topLayout = QtWidgets.QHBoxLayout()
diff --git a/examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py b/examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py
index 68a54d552..035358e65 100644
--- a/examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py
+++ b/examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py
@@ -242,7 +242,8 @@ class Robot(RobotPart):
self.animations[0].setScaleAt(1, 1.1, 1.1)
self.timeline.setUpdateInterval(1000 / 25)
- self.timeline.setCurveShape(QtCore.QTimeLine.SineCurve)
+ curve = QtCore.QEasingCurve(QtCore.QEasingCurve.SineCurve)
+ self.timeline.setEasingCurve(curve)
self.timeline.setLoopCount(0)
self.timeline.setDuration(2000)
self.timeline.start()