diff options
author | Daniel J Brown <browndj3@gmail.com> | 2021-12-16 11:33:55 -0600 |
---|---|---|
committer | Daniel J Brown <browndj3@gmail.com> | 2021-12-17 08:47:56 -0600 |
commit | 68fc31e0304c3cdf33aef5ad3e13786362496c59 (patch) | |
tree | 10f950f6b53a8d95fc8b4b0eb763625ee75911f7 /examples | |
parent | 945f962bd34e2c02d7c31f68428627c5fee6a1e9 (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()`
Pick-to: 6.2
Fixes: PYSIDE-1732
Change-Id: I9876ceb53043cbce2e452326fe8fdb4f47e87e79
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'examples')
-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 |