Subgroup: Color

Class: QgsColorWidgetAction

class qgis.gui.QgsColorWidgetAction

Bases: PyQt5.QtWidgets.QWidgetAction

An action containing a color widget, which can be embedded into a menu.

See also

QgsColorWidget

New in version 2.14: Methods

actionGroup
activate
associatedGraphicsWidgets
associatedWidgets
autoRepeat
blockSignals
childEvent
children
colorWidget Returns the color widget contained in the widget action.
connectNotify
createWidget
createdWidgets
customEvent
data
defaultWidget
deleteLater
deleteWidget
disconnect
disconnectNotify
dismissOnColorSelection Returns whether the parent menu will be dismissed after a color is selected from the action’s color widget.
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
event
eventFilter
findChild findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject
findChildren findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]
font
hover
icon
iconText
inherits
installEventFilter
isCheckable
isChecked
isEnabled
isIconVisibleInMenu
isSeparator
isSignalConnected
isVisible
isWidgetType
isWindowType
killTimer
menu
menuRole
metaObject
moveToThread
objectName
parent
parentWidget
priority
property
pyqtConfigure Each keyword argument is either the name of a Qt property or a Qt signal.
receivers
releaseWidget
removeEventFilter
requestWidget
sender
senderSignalIndex
setActionGroup
setAutoRepeat
setCheckable
setChecked
setData
setDefaultWidget
setDisabled
setDismissOnColorSelection Sets whether the parent menu should be dismissed and closed when a color is selected from the action’s color widget.
setEnabled
setFont
setIcon
setIconText
setIconVisibleInMenu
setMenu
setMenuRole
setObjectName
setParent
setPriority
setProperty
setSeparator
setShortcut
setShortcutContext
setShortcuts setShortcuts(self, QKeySequence.StandardKey)
setStatusTip
setText
setToolTip
setVisible
setWhatsThis
shortcut
shortcutContext
shortcuts
showStatusText
signalsBlocked
startTimer
statusTip
text
thread
timerEvent
toggle
toolTip
tr
trigger
whatsThis

Attributes

AboutQtRole
AboutRole
ApplicationSpecificRole
HighPriority
Hover
LowPriority
NoRole
NormalPriority
PreferencesRole
QuitRole
TextHeuristicRole
Trigger
changed changed(self) [signal]
colorChanged Emitted when a color has been selected from the widget
destroyed destroyed(self, QObject = None) [signal]
hovered hovered(self) [signal]
objectNameChanged objectNameChanged(self, str) [signal]
staticMetaObject
toggled toggled(self, bool) [signal]
triggered triggered(self, bool = False) [signal]
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.

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.

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 – 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.

timerEvent()