aboutsummaryrefslogtreecommitdiffstats
path: root/examples/widgets/tetrix/tetrix.py
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2022-09-19 16:49:09 +0200
committerCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2022-09-21 18:01:52 +0000
commitcfaa4bc87d44e1c7c00b78c3cc0117559ef95cfe (patch)
treee540e70c1fed34a04b1b59c17d0f8a2534cc4f8e /examples/widgets/tetrix/tetrix.py
parentc5f2631bdfc1ba4e5fd87375c59227681964654c (diff)
examples: fix unused imports and minor errors in 'widgets'
Change-Id: I0aad3aefb2f036bf4edc2d0942f007045d605e26 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'examples/widgets/tetrix/tetrix.py')
-rw-r--r--examples/widgets/tetrix/tetrix.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/tetrix/tetrix.py b/examples/widgets/tetrix/tetrix.py
index 391ea0a2a..3accd557a 100644
--- a/examples/widgets/tetrix/tetrix.py
+++ b/examples/widgets/tetrix/tetrix.py
@@ -9,7 +9,7 @@ import random
import sys
from PySide6.QtCore import QBasicTimer, QSize, Qt, Signal, Slot
-from PySide6.QtGui import QColor, QPainter
+from PySide6.QtGui import QColor, QPainter, QPixmap
from PySide6.QtWidgets import (QApplication, QFrame, QGridLayout, QLabel,
QLCDNumber, QPushButton, QWidget)
@@ -324,7 +324,7 @@ class TetrixBoard(QFrame):
with QPainter(pixmap) as painter:
painter.fillRect(pixmap.rect(), self.nextPieceLabel.palette().background())
- for int in range(4):
+ for i in range(4):
x = self._next_piece.x(i) - self._next_piece.min_x()
y = self._next_piece.y(i) - self._next_piece.min_y()
self.draw_square(painter, x * self.square_width(),