mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 17:54:32 +03:00
Merge pull request #1942 from python-pillow/pyqt4-pyqt5
Fix for program importing PyQt4 when PyQt5 also installed
This commit is contained in:
commit
8d8990a9d4
|
@ -26,12 +26,12 @@ try:
|
||||||
from PyQt5.QtGui import QImage, qRgba, QPixmap
|
from PyQt5.QtGui import QImage, qRgba, QPixmap
|
||||||
from PyQt5.QtCore import QBuffer, QIODevice
|
from PyQt5.QtCore import QBuffer, QIODevice
|
||||||
qt_version = '5'
|
qt_version = '5'
|
||||||
except ImportError:
|
except (ImportError, RuntimeError):
|
||||||
try:
|
try:
|
||||||
from PyQt4.QtGui import QImage, qRgba, QPixmap
|
from PyQt4.QtGui import QImage, qRgba, QPixmap
|
||||||
from PyQt4.QtCore import QBuffer, QIODevice
|
from PyQt4.QtCore import QBuffer, QIODevice
|
||||||
qt_version = '4'
|
qt_version = '4'
|
||||||
except ImportError:
|
except (ImportError, RuntimeError):
|
||||||
try:
|
try:
|
||||||
from PySide.QtGui import QImage, qRgba, QPixmap
|
from PySide.QtGui import QImage, qRgba, QPixmap
|
||||||
from PySide.QtCore import QBuffer, QIODevice
|
from PySide.QtCore import QBuffer, QIODevice
|
||||||
|
|
Loading…
Reference in New Issue
Block a user