mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Merge pull request #1003 from AurelienBallier/master
Use PyQt4 if already imported
This commit is contained in:
commit
212f9d7d8b
|
@ -18,12 +18,15 @@
|
|||
|
||||
from PIL import Image
|
||||
from PIL._util import isPath
|
||||
import sys
|
||||
|
||||
try:
|
||||
if 'PyQt4.QtGui' not in sys.modules:
|
||||
try:
|
||||
from PyQt5.QtGui import QImage, qRgba
|
||||
except:
|
||||
except:
|
||||
from PyQt4.QtGui import QImage, qRgba
|
||||
|
||||
else: #PyQt4 is used
|
||||
from PyQt4.QtGui import QImage, qRgba
|
||||
|
||||
##
|
||||
# (Internal) Turns an RGB color into a Qt compatible color integer.
|
||||
|
|
Loading…
Reference in New Issue
Block a user