Action

Search for usage in LXR

Action Class Reference

Properties

Shortcut alternateShortcut
 
listTAction children
 
Component displayComponent
 
int displayHint
 
bool expandible
 
QtObject fromQAction
 
TAction parent
 
bool separator
 
string tooltip
 
bool visible
 
listTAction visibleChildren
 

Detailed Description

An item that represents an abstract Action.

Definition at line 17 of file Action.qml.

Property Documentation

◆ alternateShortcut

Shortcut Action::alternateShortcut
read
Remarks
This property is read-only

Definition at line 130 of file Action.qml.

◆ children

listTAction Action::children
read

This property holds a list of child actions.

Remarks
This is the default property

This is useful for tree-like menus, such as the GlobalDrawer.

Example usage:

import QtQuick.Controls as QQC2
import org.kde.kirigami as Kirigami
Kirigami.Action {
text: "Tools"
QQC2.Action {
text: "Action1"
}
Kirigami.Action {
text: "Action2"
}
}

Definition at line 100 of file Action.qml.

◆ displayComponent

Component Action::displayComponent
read

This property holds the component that should be used for displaying this action.

Note
This can be used to display custom components in the toolbar.
Since
5.65
2.12

Definition at line 75 of file Action.qml.

◆ displayHint

int Action::displayHint
read

This property sets this action's display type.

These are provided to implementations to indicate a preference for certain display styles.

default: Kirigami.DisplayHint.NoPreference

Note
This property contains only preferences, implementations may choose to disregard them.
See also
org::kde::kirigami::DisplayHint
Since
2.12

Definition at line 68 of file Action.qml.

◆ expandible

bool Action::expandible
read

This property sets whether this action becomes a title displaying its child actions as sub-items in GlobalDrawers and ContextDrawers.

default: false

Since
2.6

Definition at line 51 of file Action.qml.

◆ fromQAction

QtObject Action::fromQAction
read

This property holds a QAction.

When provided Kirigami.Action will be initialized from the given QAction.

Since
Kirigami 6.4.0

Definition at line 108 of file Action.qml.

◆ parent

TAction Action::parent
read

This property holds the parent action.

Definition at line 55 of file Action.qml.

◆ separator

bool Action::separator
read

This property sets whether this action is a separator action.

default: false

Definition at line 42 of file Action.qml.

◆ tooltip

string Action::tooltip
read

This property holds the tooltip text that is shown when the cursor is hovering over the control.

Leaving this undefined or setting it to an empty string means that no tooltip will be shown when the cursor is hovering over the control that triggers the tooltip.

Warning
Tooltips may not be supported on all platforms.

Definition at line 36 of file Action.qml.

◆ visible

bool Action::visible
read

This property holds whether the graphic representation of the action is supposed to be visible.

It's up to the action representation to honor this property.

default: true

Definition at line 28 of file Action.qml.

◆ visibleChildren

listTAction Action::visibleChildren
read

This property holds the action's visible child actions.

Remarks
This property is read-only

Definition at line 118 of file Action.qml.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.