Skip to content

Commit 1b7be6f

Browse files
committed
Merge pull request #126 from stonebig/master
PyQt5 bug fix
2 parents 636b440 + e7d71b1 commit 1b7be6f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

winpython/qt/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@
99

1010
import os
1111

12-
os.environ.setdefault('QT_API', 'pyqt')
12+
import imp
13+
14+
try:
15+
#be friendly with Pyqt5
16+
are_you_here = __import__('PyQt5')
17+
os.environ.setdefault('QT_API','pyqt5')
18+
except:
19+
os.environ.setdefault('QT_API', 'pyqt')
20+
1321
assert os.environ['QT_API'] in ('pyqt5', 'pyqt', 'pyside')
1422

1523
API = os.environ['QT_API']

0 commit comments

Comments
 (0)