Search for usage in LXR

org::kde::kirigami::PromptDialog Class Reference
Inheritance diagram for org::kde::kirigami::PromptDialog:


real contentBottomPadding
real contentLeftPadding
real contentPadding
real contentRightPadding
real contentTopPadding
alias mainItem
string subtitle
- Properties inherited from org::kde::kirigami::Dialog
real absoluteMaximumHeight
real absoluteMaximumWidth
alias dialogChildren
alias dialogData
bool flatFooterButtons
Component footerLeadingComponent
Component footerTrailingComponent
list Kirigami
Item mainItem
real maximumHeight
real maximumWidth
real preferredHeight
real preferredWidth
bool showCloseButton

Additional Inherited Members

- Public Member Functions inherited from org::kde::kirigami::Dialog
void standardButton (button)

Detailed Description

A simple dialog to quickly prompt a user with information, and possibly perform an action.

Provides content padding (instead of padding outside of the scroll area). Also has a default preferredWidth, as well as the subtitle property.

Note: If a mainItem is specified, it will replace the subtitle label, and so the respective property will have no effect.

See also

Example usage:

Kirigami.PromptDialog {
title: "Reset settings?"
subtitle: "The stored settings for the application will be deleted, with the defaults restored."
standardButtons: Kirigami.Dialog.Ok | Kirigami.Dialog.Cancel
onAccepted: console.log("Accepted")
onRejected: console.log("Rejected")

Text field prompt dialog:

Kirigami.PromptDialog {
id: textPromptDialog
title: "New Folder"
standardButtons: Kirigami.Dialog.NoButton
customFooterActions: [
Kirigami.Action {
text: qsTr("Create Folder")
iconName: "dialog-ok"
onTriggered: {
Kirigami.Action {
text: qsTr("Cancel")
iconName: "dialog-cancel"
onTriggered: {
QQC2.TextField {
placeholderText: qsTr("Folder name...")

Definition at line 69 of file PromptDialog.qml.

Property Documentation

◆ contentBottomPadding

real org::kde::kirigami::PromptDialog::contentBottomPadding

The bottom padding of the content, within the scroll area.

Definition at line 91 of file PromptDialog.qml.

◆ contentLeftPadding

real org::kde::kirigami::PromptDialog::contentLeftPadding

The left padding of the content, within the scroll area.

Definition at line 95 of file PromptDialog.qml.

◆ contentPadding

real org::kde::kirigami::PromptDialog::contentPadding

The padding around the content, within the scroll area.

Default is Kirigami.Units.largeSpacing.

Definition at line 83 of file PromptDialog.qml.

◆ contentRightPadding

real org::kde::kirigami::PromptDialog::contentRightPadding

The right padding of the content, within the scroll area.

Definition at line 99 of file PromptDialog.qml.

◆ contentTopPadding

real org::kde::kirigami::PromptDialog::contentTopPadding

The top padding of the content, within the scroll area.

Definition at line 87 of file PromptDialog.qml.

◆ mainItem

alias org::kde::kirigami::PromptDialog::mainItem
This is the default property

Definition at line 73 of file PromptDialog.qml.

◆ subtitle

string org::kde::kirigami::PromptDialog::subtitle

The text to use in the dialog's contents.

Definition at line 77 of file PromptDialog.qml.

The documentation for this class was generated from the following file:
list Kirigami
This property holds the custom actions displayed in the footer.
Definition: Dialog.qml:232
string subtitle
The text to use in the dialog's contents.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 6 2023 04:13:18 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.