Qt6 compatibility

This commit is contained in:
Mathieu Pellerin 2025-01-27 09:56:31 +07:00 committed by Nyall Dawson
parent 8f9024bcb6
commit efdb16ef36
2 changed files with 2 additions and 2 deletions

View File

@ -322,7 +322,7 @@ class PythonConsoleWidget(QWidget):
self.toggleCommentEditorButton.setIcon(
QgsApplication.getThemeIcon(
"console/iconCommentEditorConsole.svg",
self.palette().color(QPalette.WindowText),
self.palette().color(QPalette.ColorRole.WindowText),
),
)
self.toggleCommentEditorButton.setMenuRole(QAction.MenuRole.PreferencesRole)

View File

@ -263,7 +263,7 @@ class Editor(QgsCodeEditorPython):
toggle_comment_action = QAction(
QgsApplication.getThemeIcon(
"console/iconCommentEditorConsole.svg",
self.palette().color(QPalette.WindowText),
self.palette().color(QPalette.ColorRole.WindowText),
),
QCoreApplication.translate("PythonConsole", "Toggle Comment"),
menu,