diff --git a/src/PIL/ImageQt.py b/src/PIL/ImageQt.py index 6b965ffe4c4..e142f1f277e 100644 --- a/src/PIL/ImageQt.py +++ b/src/PIL/ImageQt.py @@ -34,7 +34,7 @@ for qt_version, qt_module in qt_versions: try: if qt_module == "PyQt6": - from PyQt6.QtCore import QBuffer, QIODevice, QIODeviceBase + from PyQt6.QtCore import QBuffer, QIODevice from PyQt6.QtGui import QImage, QPixmap, qRgba elif qt_module == "PySide6": from PySide6.QtCore import QBuffer, QIODevice @@ -68,7 +68,7 @@ def fromqimage(im): buffer = QBuffer() if qt_version == "6": try: - qt_openmode = QIODeviceBase.OpenModeFlag + qt_openmode = QIODevice.OpenModeFlag except AttributeError: qt_openmode = QIODevice.OpenMode else: