Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions qtpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ class PythonQtWarning(Warning):
PYQT5 = True
PYQT6 = PYSIDE2 = PYSIDE6 = False

# When `FORCE_QT_API` is set, we disregard
# any previously imported python bindings.
if 'FORCE_QT_API' in os.environ:
# Unless `FORCE_QT_API` is set, use previously imported Qt Python bindings
if not os.environ.get('FORCE_QT_API'):
if 'PyQt6' in sys.modules:
API = initial_api if initial_api in PYQT6_API else 'pyqt6'
elif 'PyQt5' in sys.modules:
Expand Down