Skip to content

Commit d8afeb0

Browse files
committed
Patch addAction for Qt < 6.4
Some 6.3.2 builds still seem to lack the flexibility.
1 parent 849a349 commit d8afeb0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

qtpy/QtWidgets.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@
1414
from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6
1515
from . import QT_VERSION as _qt_version
1616
from ._utils import (
17-
add_action,
1817
getattr_missing_optional_dep,
1918
possibly_static_exec,
20-
set_shortcut,
21-
set_shortcuts,
2219
static_method_kwargs_wrapper,
2320
)
2421

@@ -212,8 +209,9 @@ def __getattr__(name):
212209
"directory",
213210
)
214211

215-
# Make `addAction` compatible with Qt6 >= 6.3
216-
if PYQT5 or PYSIDE2 or parse(_qt_version) < parse("6.3"):
212+
# Make `addAction` compatible with Qt6 >= 6.4
213+
if PYQT5 or PYSIDE2 or parse(_qt_version) < parse("6.4"):
214+
from ._utils import add_action
217215

218216
class _QMenu(QMenu):
219217
old_add_action = QMenu.addAction

0 commit comments

Comments
 (0)