Skip to content

Odd code found for PyQt5 in tests/conftest.py: importing too much? #504

@StSav012

Description

@StSav012

Shouldn't there be QtCore instead of just Qt?

try:
from PyQt5 import Qt
versions += f"PyQt: {Qt.PYQT_VERSION_STR} - Qt: {Qt.QT_VERSION_STR}"
except ImportError:

For PyQt6, it is so:

try:
from PyQt6 import QtCore
versions += (
f"PyQt: {QtCore.PYQT_VERSION_STR} - Qt: {QtCore.QT_VERSION_STR}"
)
except ImportError:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions