aboutsummaryrefslogtreecommitdiffstats
path: root/examples/widgets/tutorials/cannon
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/tutorials/cannon')
-rw-r--r--examples/widgets/tutorials/cannon/t14.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/tutorials/cannon/t14.py b/examples/widgets/tutorials/cannon/t14.py
index d558d2e61..19fb95ac8 100644
--- a/examples/widgets/tutorials/cannon/t14.py
+++ b/examples/widgets/tutorials/cannon/t14.py
@@ -217,13 +217,13 @@ class CannonField(QtWidgets.QWidget):
def mousePressEvent(self, event):
if event.button() != QtCore.Qt.LeftButton:
return
- if self.barrelHit(event.pos()):
+ if self.barrelHit(event.position().toPoint()):
self.barrelPressed = True
def mouseMoveEvent(self, event):
if not self.barrelPressed:
return
- pos = event.pos()
+ pos = event.position().toPoint()
if pos.x() <= 0:
pos.setX(1)
if pos.y() >= self.height():