diff options
author | Daniel J Brown <browndj3@gmail.com> | 2021-12-16 11:33:55 -0600 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-12-24 08:02:38 +0000 |
commit | 61a121897409cd9bcb0cfaf7004182ff8d288591 (patch) | |
tree | c926ef1833197af2a05496853ea47426d37d642f | |
parent | fe5799abbb27d898b26af8f1f6ea4437b711fac2 (diff) |
Fix Tetrix example error
Previously, the Tetrix example used the old camelCase style method
names. The `.setShape()` method in the code was not changed to reflect
the swap to snake_case which caused errors.
`.setShape()` has now been swapped for `.set_shape()`
Fixes: PYSIDE-1732
Change-Id: I9876ceb53043cbce2e452326fe8fdb4f47e87e79
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit 68fc31e0304c3cdf33aef5ad3e13786362496c59)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | examples/widgets/tetrix/tetrix.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/tetrix/tetrix.py b/examples/widgets/tetrix/tetrix.py index 1427c9770..3b4d32cca 100644 --- a/examples/widgets/tetrix/tetrix.py +++ b/examples/widgets/tetrix/tetrix.py @@ -334,7 +334,7 @@ class TetrixBoard(QFrame): self.timer.start(500, self) self._is_waiting_after_line = True - self._cur_piece.setShape(Piece.NoShape) + self._cur_piece.set_shape(Piece.NoShape) self.update() def new_piece(self): @@ -345,7 +345,7 @@ class TetrixBoard(QFrame): self._cur_y = TetrixBoard.board_height - 1 + self._cur_piece.min_y() if not self.try_move(self._cur_piece, self._cur_x, self._cur_y): - self._cur_piece.setShape(Piece.NoShape) + self._cur_piece.set_shape(Piece.NoShape) self.timer.stop() self._is_started = False |