Class: QgsColorWidgetAction¶
-
class
qgis.gui.
QgsColorWidgetAction
(colorWidget: QgsColorWidget, menu: QMenu = None, parent: QWidget = None)¶ Bases:
PyQt5.QtWidgets.QWidgetAction
Construct a new color widget action.
- Parameters
colorWidget (QgsColorWidget) –
QgsColorWidget
to show in actionmenu (QMenu = None) – parent menu
parent (QWidget = None) – parent widget
An action containing a color widget, which can be embedded into a menu.
See also
Methods
Returns the color widget contained in the widget action.
Returns whether the parent menu will be dismissed after a color is selected from the action’s color widget.
Sets whether the parent menu should be dismissed and closed when a color is selected from the action’s color widget.
Signals
Emitted when a color has been selected from the widget
-
childEvent
()¶
-
colorChanged
¶ Emitted when a color has been selected from the widget
- Parameters
color – selected color [signal]
-
colorWidget
(self) → QgsColorWidget¶ Returns the color widget contained in the widget action.
- Return type
-
connectNotify
()¶
-
createWidget
()¶
-
createdWidgets
()¶
-
customEvent
()¶
-
deleteWidget
()¶
-
disconnectNotify
()¶
-
dismissOnColorSelection
(self) → bool¶ Returns whether the parent menu will be dismissed after a color is selected from the action’s color widget.
See also
- Return type
bool
-
event
()¶
-
eventFilter
()¶
-
isSignalConnected
()¶
-
receivers
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setDismissOnColorSelection
(self, dismiss: bool)¶ Sets whether the parent menu should be dismissed and closed when a color is selected from the action’s color widget.
- Parameters
dismiss (bool) – set to true (default) to immediately close the menu when a color is selected from the widget. If set to false, the colorChanged signal will be emitted but the menu will stay open.
See also
-
timerEvent
()¶