ECommandPalette Command palette
Examples
Search and run commands
Search by keywords
Disabled commands
Keep open after execution
Run a Qt Action
Properties
closeOnTriggerboolClose the palette after a command succeeds.
truecurrentIndexintIndex of the currently selected command or step.
-1: no selection
0 and above: item index
-1enabledboolAllow interaction; false disables the control.
truefontfontFont settings for the family, size and text style.
Common fields:
family, pixelSize, pointSize
bold, italic, weight
underline, strikeout
letterSpacing, wordSpacing
Qt.font({ pixelSize: 16 })heightrealComponent size in pixels; may be bound to its parent layout.
implicitHeightmodelvarItem model; fields are described in the examples and usage guide.
[]placeholderTextstringPlaceholder for the search field.
EControlConfig.textFor(control, "CommandSearch", ELocale.texts)querystringCommand search text, split into words and matched case-insensitively.
""shortcutstringShortcut to toggle the palette; an empty string disables it.
"Ctrl+Shift+P"visibleboolWhether the component is visible.
truevisibleRowsintMaximum number of directly visible command rows.
8widthrealComponent size in pixels; may be bound to its parent layout.
implicitWidthfilteredItemsvarRead onlyVisible commands matching the current query.
Computed at runtimeSignals
failed(string message)Emitted when an operation fails; message describes the error.
command(var value, var item)Emitted when a command is invoked, with its value and menu item.
Methods
trigger(index)Invoke the specified item command, as if the item were selected.