mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
Merge pull request #74 from radarhere/mingw-qt6
Use QIODevice instead of QIODeviceBase
This commit is contained in:
commit
033d1fc8ec
|
@ -34,7 +34,7 @@ qt_versions.sort(key=lambda qt_version: qt_version[1] in sys.modules, reverse=Tr
|
||||||
for qt_version, qt_module in qt_versions:
|
for qt_version, qt_module in qt_versions:
|
||||||
try:
|
try:
|
||||||
if qt_module == "PyQt6":
|
if qt_module == "PyQt6":
|
||||||
from PyQt6.QtCore import QBuffer, QIODevice, QIODeviceBase
|
from PyQt6.QtCore import QBuffer, QIODevice
|
||||||
from PyQt6.QtGui import QImage, QPixmap, qRgba
|
from PyQt6.QtGui import QImage, QPixmap, qRgba
|
||||||
elif qt_module == "PySide6":
|
elif qt_module == "PySide6":
|
||||||
from PySide6.QtCore import QBuffer, QIODevice
|
from PySide6.QtCore import QBuffer, QIODevice
|
||||||
|
@ -68,7 +68,7 @@ def fromqimage(im):
|
||||||
buffer = QBuffer()
|
buffer = QBuffer()
|
||||||
if qt_version == "6":
|
if qt_version == "6":
|
||||||
try:
|
try:
|
||||||
qt_openmode = QIODeviceBase.OpenModeFlag
|
qt_openmode = QIODevice.OpenModeFlag
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
qt_openmode = QIODevice.OpenMode
|
qt_openmode = QIODevice.OpenMode
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user