aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtGui/qpen_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/QtGui/qpen_test.py')
-rw-r--r--sources/pyside6/tests/QtGui/qpen_test.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/sources/pyside6/tests/QtGui/qpen_test.py b/sources/pyside6/tests/QtGui/qpen_test.py
index a3328c2e7..1a187c1ed 100644
--- a/sources/pyside6/tests/QtGui/qpen_test.py
+++ b/sources/pyside6/tests/QtGui/qpen_test.py
@@ -25,9 +25,9 @@ class Painting(QRasterWindow):
def paintEvent(self, event):
with QPainter(self) as painter:
- painter.setPen(Qt.NoPen)
+ painter.setPen(Qt.PenStyle.NoPen)
self.penFromEnum = painter.pen()
- intVal = Qt.NoPen.value
+ intVal = Qt.PenStyle.NoPen.value
painter.setPen(intVal)
self.penFromInteger = painter.pen()
QTimer.singleShot(20, self.close)
@@ -41,7 +41,7 @@ class QPenTest(UsesQApplication):
style = Qt.PenStyle(0)
cap = Qt.PenCapStyle(0)
join = Qt.PenJoinStyle(0)
- pen = QPen(Qt.blue, width, style, cap, join) # noqa: F841
+ pen = QPen(Qt.GlobalColor.blue, width, style, cap, join) # noqa: F841
def testSetPenWithPenStyleEnum(self):
'''Calls QPainter.setPen with both enum and integer. Bug #511.'''
@@ -49,8 +49,8 @@ class QPenTest(UsesQApplication):
w.show()
w.setTitle("qpen_test")
self.app.exec()
- self.assertEqual(w.penFromEnum.style(), Qt.NoPen)
- self.assertEqual(w.penFromInteger.style(), Qt.SolidLine)
+ self.assertEqual(w.penFromEnum.style(), Qt.PenStyle.NoPen)
+ self.assertEqual(w.penFromInteger.style(), Qt.PenStyle.SolidLine)
if __name__ == '__main__':