Skip to content

Commit f482f37

Browse files
committed
Update qt_compat.py
Pyqt5 by default.
1 parent 2a23a63 commit f482f37

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/matplotlib/backends/qt_compat.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@
3131
QT_RC_MAJOR_VERSION = 4
3232
else:
3333
# A different backend was specified, but we still got here because a Qt
34-
# related file was imported. This is allowed, so lets try and guess
34+
# related file was imported. This is allowed, so lets try and guess
3535
# what we should be using.
36-
if "PyQt5" in sys.modules:
36+
if "PyQt4" in sys.modules:
3737
# PyQt5 is actually used.
38-
QT_RC_MAJOR_VERSION = 5
38+
QT_RC_MAJOR_VERSION = 4
3939
else:
4040
# This is a fallback
41-
QT_RC_MAJOR_VERSION = 4
41+
QT_RC_MAJOR_VERSION = 5
4242

4343
QT_API = None
4444

@@ -62,14 +62,14 @@
6262
QT_API = rcParams['backend.qt4']
6363
else:
6464
# A different backend was specified, but we still got here because a Qt
65-
# related file was imported. This is allowed, so lets try and guess
65+
# related file was imported. This is allowed, so lets try and guess
6666
# what we should be using.
67-
if "PyQt5" in sys.modules:
68-
# PyQt5 is actually used.
69-
QT_API = rcParams['backend.qt5']
67+
if "PyQt4" in sys.modules:
68+
# PyQt4 is actually used.
69+
QT_API = rcParams['backend.qt4']
7070
else:
7171
# This is a fallback
72-
QT_API = rcParams['backend.qt4']
72+
QT_API = rcParams['backend.qt5']
7373

7474
# We will define an appropriate wrapper for the differing versions
7575
# of file dialog.

0 commit comments

Comments
 (0)