Class: QgsCodeEditorDockWidget

A custom dock widget for code editors.

Warning

Exposed to Python for internal use only – this class is not considered stable API.

Added in version 3.32.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsCodeEditorDockWidget

Base classes

QWidget

QObject

QPaintDevice

Methods

dockToggleButton

Returns the dock toggle button for the widget, which is used to toggle between dock or full window mode.

isUserVisible

Returns True if the widget is user visible.

setDockObjectName

Sets the object name of the dock widget

setTitle

Sets the title to use for the code editor dock widget or window.

setUserVisible

Sets whether the editor is user visible.

Signals

visibilityChanged

Emitted when the editor's visibility is changed.

class qgis.gui.QgsCodeEditorDockWidget[source]

Bases: QWidget

__init__(windowGeometrySettingsKey: str | None = '', usePersistentWidget: bool = False)

Constructor for QgsCodeEditorDockWidget, with the specified window geometry settings key.

If usePersistentWidget is True then the widget (either as a dock or window) cannot be destroyed and must be hidden instead.

Parameters:
  • windowGeometrySettingsKey (Optional[str] = '')

  • usePersistentWidget (bool = False)

dockToggleButton(self) QToolButton | None[source]

Returns the dock toggle button for the widget, which is used to toggle between dock or full window mode.

Return type:

Optional[QToolButton]

isUserVisible(self) bool[source]

Returns True if the widget is user visible.

Return type:

bool

setDockObjectName(self, name: str | None)[source]

Sets the object name of the dock widget

Parameters:

name (Optional[str])

setTitle(self, title: str | None)[source]

Sets the title to use for the code editor dock widget or window.

Parameters:

title (Optional[str])

setUserVisible(self, visible: bool)[source]

Sets whether the editor is user visible.

Parameters:

visible (bool)

signal visibilityChanged(isVisible: bool)[source]

Emitted when the editor’s visibility is changed.

Parameters:

isVisible (bool)