ContextDrawer QML Type

Import Statement: import org.kde.kirigami
Inherits:

OverlayDrawer

Properties

Detailed Description

A specialized type of drawer that will show a list of actions relevant to the application's current page.

Example usage:

import org.kde.kirigami as Kirigami

Kirigami.ApplicationWindow {
    contextDrawer: Kirigami.ContextDrawer {
        enabled: true
        actions: [
            Kirigami.Action {
                icon.name: "edit"
                text: "Action text"
                onTriggered: {
                    // do stuff
                }
            },
            Kirigami.Action {
                icon.name: "edit"
                text: "Action text"
                onTriggered: {
                    // do stuff
                }
            }
        ]
    }
}

Property Documentation

actions : T.Action

List of contextual actions to be displayed in a ListView.


Arbitrary content to show below the list view.

This property was introduced in 2.7.


header : Component [since 2.7]

Arbitrary content to show above the list view.

default: an Item containing a Kirigami.Heading that displays a title whose text is controlled by the title property.`

This property was introduced in 2.7.


title : string

A title for the action list that will be shown to the user when opens the drawer

default: qsTr("Actions")