|
31 | 31 | QT_RC_MAJOR_VERSION = 4 |
32 | 32 | else: |
33 | 33 | # 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 |
35 | 35 | # what we should be using. |
36 | | - if "PyQt5" in sys.modules: |
| 36 | + if "PyQt4" in sys.modules: |
37 | 37 | # PyQt5 is actually used. |
38 | | - QT_RC_MAJOR_VERSION = 5 |
| 38 | + QT_RC_MAJOR_VERSION = 4 |
39 | 39 | else: |
40 | 40 | # This is a fallback |
41 | | - QT_RC_MAJOR_VERSION = 4 |
| 41 | + QT_RC_MAJOR_VERSION = 5 |
42 | 42 |
|
43 | 43 | QT_API = None |
44 | 44 |
|
|
62 | 62 | QT_API = rcParams['backend.qt4'] |
63 | 63 | else: |
64 | 64 | # 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 |
66 | 66 | # 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'] |
70 | 70 | else: |
71 | 71 | # This is a fallback |
72 | | - QT_API = rcParams['backend.qt4'] |
| 72 | + QT_API = rcParams['backend.qt5'] |
73 | 73 |
|
74 | 74 | # We will define an appropriate wrapper for the differing versions |
75 | 75 | # of file dialog. |
|
0 commit comments