Skip to content
AtlasOSFramework API
Browse the docs

AtlasCommandPalette

A searchable popup list of the app's actions, opened with a shortcut such as Ctrl+K.

Since 1.4.0

AtlasCommandPalette is a search field over a list of the app's actions. Typing filters the actions: every word of the query must appear in the action's text or section, in any case, and names that start with the query come first. Only enabled actions are listed. With an empty query, the actions run most recently come first (kept in memory only). Each row shows the symbol, text, section and shortcut of the action.

It is a Qt Quick Controls Popup: declare it anywhere and call open(). See https://doc.qt.io/qt-6/qml-qtquick-controls-popup.html. Actions are AtlasAction items.

Example

AtlasCommandPalette { id: palette }
AtlasAction {
    text: qsTr("Command Palette")
    shortcut: "Ctrl+K"
    onTriggered: palette.open()
}

Keyboard

  • Up and Down move the highlight.
  • Return runs the highlighted action and closes the palette.
  • Escape closes it.

Properties

Name Type Default Description
actions list<QtObject> AtlasShortcuts.actions (every AtlasAction of the app) The actions on offer: anything with text, enabled and trigger(), and optionally symbol, section and shortcut. Give a list to offer fewer.
placeholderText string qsTr("Type a command") Hint in the empty search field.
query string "" The text in the search field.
recentCount int 5 How many recently run actions lead the empty list.

Signals

Name Description
triggered(QtObject action) Emitted after the palette closed and the action ran.