Skip to content

Commit 9f76572

Browse files
committed
Fix wrong Qt version variable
1 parent 0415b5d commit 9f76572

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

qdarktheme/qtpy/qt_version.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@
55

66
__version__: str | None = None
77
if QT_API == "PySide6":
8-
from PySide6 import __version__ # type: ignore
8+
from PySide6.QtCore import qVersion # type: ignore
9+
10+
__version__ = qVersion().decode("utf-8")
911
elif QT_API == "PyQt6":
10-
from PyQt6.QtCore import PYQT_VERSION_STR # type: ignore
12+
from PyQt6.QtCore import qVersion # type: ignore
1113

12-
__version__ = PYQT_VERSION_STR
14+
__version__ = qVersion()
1315
elif QT_API == "PyQt5":
14-
from PyQt5.QtCore import PYQT_VERSION_STR # type: ignore
16+
from PyQt5.QtCore import qVersion # type: ignore
1517

16-
__version__ = PYQT_VERSION_STR
18+
__version__ = qVersion()
1719
elif QT_API == "PySide2":
18-
from PySide2 import __version__ # type: ignore # noqa: F401
20+
from PySide2.QtCore import qVersion # type: ignore
21+
22+
__version__ = qVersion().decode("utf-8")

0 commit comments

Comments
 (0)