aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtGui
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-06-18 08:04:57 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-06-18 12:12:38 +0200
commit6938ca19e7a2b200ee83fdddce3c5908199c1f75 (patch)
treeaf0bfe36b6d10b5fb91dd676b45ea9f3817d2f52 /sources/pyside6/tests/QtGui
parent4269e3535b7b97c188a6d8377e685586da89592f (diff)
PySide6: Add further global functions
Task-number: PYSIDE-1482 Pick-to: 6.1 Change-Id: I337f8c817bc4d612a02a5482a63a94303e11c300 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/pyside6/tests/QtGui')
-rw-r--r--sources/pyside6/tests/QtGui/qpixelformat_test.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/sources/pyside6/tests/QtGui/qpixelformat_test.py b/sources/pyside6/tests/QtGui/qpixelformat_test.py
index 448bc3d5a..e2fd084af 100644
--- a/sources/pyside6/tests/QtGui/qpixelformat_test.py
+++ b/sources/pyside6/tests/QtGui/qpixelformat_test.py
@@ -39,7 +39,7 @@ init_test_paths(False)
from helper.usesqapplication import UsesQApplication
from PySide6.QtCore import QSize, Qt
-from PySide6.QtGui import QColor, QImage, QPixelFormat
+from PySide6.QtGui import QColor, QImage, QPixelFormat, qPixelFormatRgba
class QPixelFormatTest(UsesQApplication):
@@ -54,6 +54,12 @@ class QPixelFormatTest(UsesQApplication):
self.assertEqual(pixelFormat.blueSize(), 8)
self.assertEqual(pixelFormat.bitsPerPixel(), 32)
+ def testHelpers(self):
+ format = qPixelFormatRgba(8, 8, 8, 8, QPixelFormat.UsesAlpha,
+ QPixelFormat.AtBeginning, QPixelFormat.Premultiplied,
+ QPixelFormat.UnsignedByte)
+ self.assertEqual(format.redSize(), 8)
+
if __name__ == '__main__':
unittest.main()