Dialog
The Dialog caters for cases in which the application requires the user to determine between optional actions. The Dialog will interrupt the user flow and lock the view for further interaction before the user has selected a desired action. It can only be closed by selecting an optional action confirming or cancelling the operation. More...
Import Statement: | import Ubuntu.Components.Popups 1.0 |
Inherits: |
Properties
- caller : Item (preliminary)
- callerMargin : real
- contents : list<Object> (preliminary)
- edgeMargins : real
- modal : bool
- pointerTarget : Item
- text : string (preliminary)
- title : string (preliminary)
Detailed Description
See also the Design Guidelines on Dialogs.
Example:
import QtQuick 2.0 import Ubuntu.Components 1.1 import Ubuntu.Components.Popups 1.0 Item { width: units.gu(80) height: units.gu(80) Component { id: dialog Dialog { id: dialogue title: "Save file" text: "Are you sure that you want to save this file?" Button { text: "cancel" onClicked: PopupUtils.close(dialogue) } Button { text: "overwrite previous version" color: UbuntuColors.orange onClicked: PopupUtils.close(dialogue) } Button { text: "save a copy" color: UbuntuColors.orange onClicked: PopupUtils.close(dialogue) } } } Button { anchors.centerIn: parent id: saveButton text: "save" onClicked: PopupUtils.open(dialog) } }
Property Documentation
caller : Item |
This QML property is under development and is subject to change.
The Item such as a Button that the user interacted with to open the Dialog. This property will be used for the automatic positioning of the Dialog next to the caller, if possible.
callerMargin : real |
The property holds the margin from the dialog's caller. The property is themed.
This QML property is under development and is subject to change.
Content will be put inside a column in the foreround of the Dialog.
edgeMargins : real |
The property holds the margins from the dialog's dismissArea. The property is themed.
modal : bool |
The property controls whether the dialog is modal or not. Modal dialogs block event propagation to items under dismissArea, when non-modal ones let these events passed to these items. In addition, non-modal dialogs do not dim the dismissArea.
The default value is true.
pointerTarget : Item |
The property holds the item to which the pointer should be anchored to. This can be same as the caller or any child of the caller. By default the property is set to caller.
text : string |
This QML property is under development and is subject to change.
The question to the user.
title : string |
This QML property is under development and is subject to change.
The title of the question to ask the user.