20 The MessageDialog type provides a QML API for message dialogs.
21
22 \image qtquickdialogs-messagedialog-android.png {The message dialog informs the user of some information, and will close when the user acknowledges the dialog}
23
24 A message dialog is used to inform the user, or ask the user a question.
25 A message dialog displays a primary \l text to alert the user to a situation,
26 an \l {informativeText}{informative text} to further explain the alert or to
27 ask the user a question, and an optional \l {detailedText}{detailed text} to
28 provide even more data if the user requests it. A message box can also display
29 a configurable set of \l buttons for accepting a user response.
30
31 To show a message dialog, construct an instance of MessageDialog, set the
32 desired properties, and call \l {Dialog::}{open()}.
33
34 \code
35 MessageDialog {
36 buttons: MessageDialog.Ok
37 text: "The document has been modified."
38 }
39 \endcode
40
41 The user must click the \uicontrol OK button to dismiss the message dialog.
42
43 A more elaborate approach than just alerting the user to an event is to
44 also ask the user what to do about it. Store the question in the
45 \l {informativeText}{informative text} property, and specify the \l buttons
46 property to the set of buttons you want as the set of user responses. The
47 buttons are specified by combining values using the bitwise OR operator.
48
49 \code
50 MessageDialog {
51 text: "The document has been modified."
52 informativeText: "Do you want to save your changes?"
59 \image qtquickdialogs-messagedialog-informative-android.png {The message dialog allows the user to make a choice based on the message, and will perform the associated action based on the buttons property}
60
61
62 \section2 Availability
63
64 A native platform message dialog is currently available on the following platforms: