diff --git a/src/PIL/ImageQt.py b/src/PIL/ImageQt.py index a3d647138df..c0b03a8812d 100644 --- a/src/PIL/ImageQt.py +++ b/src/PIL/ImageQt.py @@ -159,7 +159,7 @@ def _toqclass_helper(im: Image.Image | str | QByteArray) -> dict[str, Any]: im = im.convert("RGBA") data = im.tobytes("raw", "BGRA") - format = getattr(qt_format, "Format_RGB32") + format = getattr(qt_format, "Format_ARGB32") elif im.mode == "RGBA": data = im.tobytes("raw", "BGRA") format = getattr(qt_format, "Format_ARGB32")