diff --git a/python/console/console.py b/python/console/console.py index 0789c2e312d..3e495bc66ce 100644 --- a/python/console/console.py +++ b/python/console/console.py @@ -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) diff --git a/python/console/console_editor.py b/python/console/console_editor.py index e18e93d6a31..9503f6f92e2 100644 --- a/python/console/console_editor.py +++ b/python/console/console_editor.py @@ -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,