MnemonicData QML Type

Import Statement: import org.kde.kirigami
Since: 2.3

Attached Properties

Detailed Description

This Attached property is used to calculate automated keyboard sequences to trigger actions based upon their text: if an "&" mnemonic is used (ie "&Ok"), the system will attempt to assign the desired letter giving it priority, otherwise a letter among the ones in the label will be used if possible and not conflicting. Different kinds of controls will have different priorities in assigning the shortcut: for instance the "Ok/Cancel" buttons in a dialog will have priority over fields of a FormLayout.

Usually the developer shouldn't use this directly as base components already use this, but only when implementing a custom graphical Control.

See also ControlType.

Attached Property Documentation

MnemonicData.active : bool [since 2.15]

True when the user is pressing alt and the accelerators should be shown

This property was introduced in 2.15.


MnemonicData.controlType : enumeration

The type of control this mnemonic is attached: different types of controls have different importance and priority for shortcut assignment.

See also ControlType.


MnemonicData.enabled : bool

Only if true this mnemonic will be considered for the global assignment default: true


MnemonicData.label : string

The label of the control we want to compute a mnemonic for, instance "Label:" or "&Ok"


MnemonicData.mnemonicLabel : string

The label with an "&" mnemonic in the place which will have the shortcut assigned, regardless of whether the & was assigned by the user or automatically generated.


MnemonicData.richTextLabel : string

The user-visible final label, which will have the shortcut letter underlined, such as "<u>O</u>k"


MnemonicData.sequence : keysequence

The final key sequence assigned, if any: it will be Alt+alphanumeric char