mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-04 00:04:03 -04:00
[qt6] Add compatibility imports for QActionGroup
This moved from widgets -> gui in qt6
This commit is contained in:
parent
6ebaee1025
commit
90fbb5383b
@ -44,8 +44,9 @@ def __qcolor_repr__(self: QColor):
|
||||
QColor.__repr__ = __qcolor_repr__
|
||||
|
||||
if (QT_VERSION < 0x060000):
|
||||
from PyQt5.QtWidgets import QAction as _QAction, QShortcut as _QShortcut
|
||||
from PyQt5.QtWidgets import QAction as _QAction, QActionGroup as _QActionGroup, QShortcut as _QShortcut
|
||||
QAction = _QAction
|
||||
QActionGroup = _QActionGroup
|
||||
QShortcut = _QShortcut
|
||||
|
||||
|
||||
|
@ -26,8 +26,9 @@ from PyQt@QT_VERSION_MAJOR@.QtWidgets import *
|
||||
QLayout.setMargin = lambda self, m: self.setContentsMargins(m, m, m, m)
|
||||
|
||||
if @QT_VERSION_MAJOR@ == 6:
|
||||
from PyQt6.QtGui import QAction as _QAction, QShortcut as _QShortcut
|
||||
from PyQt6.QtGui import QAction as _QAction, QActionGroup as _QActionGroup, QShortcut as _QShortcut
|
||||
QAction = _QAction
|
||||
QActionGroup = _QActionGroup
|
||||
QShortcut = _QShortcut
|
||||
|
||||
# patch back in Qt flags removed in PyQt
|
||||
|
Loading…
x
Reference in New Issue
Block a user