Skip to content

Commit

Permalink
Use QIODevice instead of QIODeviceBase
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Oct 17, 2021
1 parent d114837 commit 43ceaa1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PIL/ImageQt.py
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 43ceaa1

Please sign in to comment.