File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 88
99"""Provides QtGui classes and functions."""
1010
11+ from functools import partialmethod
1112
1213from packaging .version import parse
1314
1415from . import PYQT5 , PYQT6 , PYSIDE2 , PYSIDE6
1516from . import QT_VERSION as _qt_version
16- from ._utils import getattr_missing_optional_dep , possibly_static_exec
17+ from ._utils import (
18+ getattr_missing_optional_dep ,
19+ possibly_static_exec ,
20+ set_shortcut ,
21+ set_shortcuts ,
22+ )
23+
1724
1825_missing_optional_names = {}
1926
@@ -260,12 +267,6 @@ def movePositionPatched(
260267
261268# Make `QAction.setShortcut` and `QAction.setShortcuts` compatible with Qt>=6.4
262269if PYQT5 or PYSIDE2 or parse (_qt_version ) < parse ("6.4" ):
263- from functools import partialmethod
264-
265- from ._utils import (
266- set_shortcut ,
267- set_shortcuts ,
268- )
269270
270271 class _QAction (QAction ):
271272 old_set_shortcut = QAction .setShortcut
Original file line number Diff line number Diff line change 1414from . import PYQT5 , PYQT6 , PYSIDE2 , PYSIDE6
1515from . import QT_VERSION as _qt_version
1616from ._utils import (
17+ add_action ,
1718 getattr_missing_optional_dep ,
1819 possibly_static_exec ,
1920 static_method_kwargs_wrapper ,
@@ -211,7 +212,6 @@ def __getattr__(name):
211212
212213# Make `addAction` compatible with Qt6 >= 6.4
213214if PYQT5 or PYSIDE2 or parse (_qt_version ) < parse ("6.4" ):
214- from ._utils import add_action
215215
216216 class _QMenu (QMenu ):
217217 old_add_action = QMenu .addAction
You can’t perform that action at this time.
0 commit comments