This file is indexed.

/usr/share/qt5/doc/qtquickdialogs/qml-qtquick-dialogs-dialog.html is in qtquickcontrols5-doc-html 5.3.2-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qquickdialog.cpp -->
  <title>Dialog QML Type | QtQuickDialogs 5.3</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li>Qt 5.3</li>
<li><a href="qtquickdialogs-index.html">Qt Quick Dialogs</a></li>
<li><a href="qtquick-dialogs-qmlmodule.html">QML Types</a></li>
<li>Dialog QML Type</li>
<li id="buildversion">
Qt 5.3.2 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">Dialog QML Type</h1>
<span class="subtitle"></span>
<!-- $$$Dialog-brief -->
<p>A generic <a href="../qtquick/qtquick-module.html">QtQuick</a> dialog wrapper with standard buttons. <a href="#details">More...</a></p>
<!-- @@@Dialog -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> </b><tt>import QtQuick.Dialogs 1.2</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 5.3</td></tr></table><ul>
<li><a href="qml-qtquick-dialogs-dialog-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-dialog.html#contentItem-prop">contentItem</a></b></b> : QObject</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-dialog.html#modality-prop">modality</a></b></b> : Qt::WindowModality</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-dialog.html#standardButtons-prop">standardButtons</a></b></b> : StandardButtons</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-dialog.html#title-prop">title</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-dialog.html#visible-prop">visible</a></b></b> : bool</li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-dialog.html#accepted-signal">accepted</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-dialog.html#apply-signal">apply</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-dialog.html#discard-signal">discard</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-dialog.html#help-signal">help</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-dialog.html#no-signal">no</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-dialog.html#rejected-signal">rejected</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-dialog.html#reset-signal">reset</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtquick-dialogs-dialog.html#yes-signal">yes</a></b></b>()</li>
</ul>
<a name="methods"></a>
<h2>Methods</h2>
<ul>
<li class="fn">void <b><b><a href="qml-qtquick-dialogs-dialog.html#close-method">close</a></b></b>()</li>
<li class="fn">void <b><b><a href="qml-qtquick-dialogs-dialog.html#open-method">open</a></b></b>()</li>
</ul>
<!-- $$$Dialog-description -->
<a name="details"></a>
<h2>Detailed Description</h2>
<p>The purpose of Dialog is to wrap arbitrary content into a <i>dialog window</i> including a row of platform-tailored buttons.</p>
<p>The <a href="qml-qtquick-dialogs-dialog.html#contentItem-prop">contentItem</a> is the default property (the only allowed child element), and items declared inside the Dialog will actually be children of another Item inside the <tt>contentItem</tt>. The row of <a href="qml-qtquick-dialogs-dialog.html#standardButtons-prop">standardButtons</a> will also be inside <tt>contentItem</tt> below the declared content, and Dialog will attempt to size itself to fit the content and the buttons.</p>
<p>Alternatively it is possible to bind <a href="qml-qtquick-dialogs-dialog.html#contentItem-prop">contentItem</a> to a custom Item, in which case there will be no buttons, no margins, and the custom content will fill the whole dialog. This is much like creating a <a href="../qtquick/qml-qtquick-window-window.html">Window</a>, except that on platforms which do not support showing multiple windows, the window borders will be simulated and it will be shown in same scene.</p>
<p><b>Note: </b>do not attempt to bind the width or height of the dialog to the width or height of its content, because Dialog already tries to size itself to the content. If your goal is to change or eliminate the margins, you must override <a href="qml-qtquick-dialogs-dialog.html#contentItem-prop">contentItem</a>. If your goal is simply to show a window (whether modal or not), and your platform supports it, it is simpler to use <a href="../qtquick/qml-qtquick-window-window.html">Window</a> instead.</p><!-- @@@Dialog -->
<h2>Property Documentation</h2>
<!-- $$$contentItem -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="contentItem-prop"></a><span class="name">contentItem</span> : <span class="type">QObject</span></p></td></tr></table></div><div class="qmldoc"><p>The QML object which implements the dialog contents. Should be an <a href="../qtquick/qml-qtquick-item.html">Item</a>.</p>
<p>For example the following dialog will show custom content and no buttons:</p>
<pre class="qml">import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Dialogs 1.2

<span class="type"><a href="qml-qtquick-dialogs-dialog.html">Dialog</a></span> {
    <span class="name">visible</span>: <span class="number">true</span>
    <span class="name">title</span>: <span class="string">&quot;Blue sky dialog&quot;</span>

    <span class="name">contentItem</span>: <span class="name">Rectangle</span> {
        <span class="name">color</span>: <span class="string">&quot;lightskyblue&quot;</span>
        <span class="name">implicitWidth</span>: <span class="number">400</span>
        <span class="name">implicitHeight</span>: <span class="number">100</span>
        <span class="type"><a href="../qtquick/qml-qtquick-text.html">Text</a></span> {
            <span class="name">text</span>: <span class="string">&quot;Hello blue sky!&quot;</span>
            <span class="name">color</span>: <span class="string">&quot;navy&quot;</span>
            <span class="name">anchors</span>.centerIn: <span class="name">parent</span>
        }
    }
}</pre>
</div></div><!-- @@@contentItem -->
<br/>
<!-- $$$modality -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="modality-prop"></a><span class="name">modality</span> : <span class="type">Qt::WindowModality</span></p></td></tr></table></div><div class="qmldoc"><p>Whether the dialog should be shown modal with respect to the window containing the dialog's parent Item, modal with respect to the whole application, or non-modal.</p>
<p>By default it is <tt>Qt.WindowModal</tt>.</p>
<p>Modality does not mean that there are any blocking calls to wait for the dialog to be accepted or rejected: only that the user will be prevented from interacting with the parent window or the application windows until the dialog is dismissed.</p>
</div></div><!-- @@@modality -->
<br/>
<!-- $$$standardButtons -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="standardButtons-prop"></a><span class="name">standardButtons</span> : <span class="type">StandardButtons</span></p></td></tr></table></div><div class="qmldoc"><p>Dialog has a row of buttons along the bottom, each of which has a <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">ButtonRole</a> that determines which signal will be emitted when the button is pressed. You can also find out which specific button was pressed after the fact via the clickedButton property. You can control which buttons are available by setting standardButtons to a bitwise-or combination of the following flags:</p>
<table class="generic">
 <tr valign="top" class="odd"><td >StandardButton.Ok</td><td >An <b>OK</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
<tr valign="top" class="even"><td >StandardButton.Open</td><td >An <b>Open</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
<tr valign="top" class="odd"><td >StandardButton.Save</td><td >A <b>Save</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
<tr valign="top" class="even"><td >StandardButton.Cancel</td><td >A <b>Cancel</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">RejectRole</a>.</td></tr>
<tr valign="top" class="odd"><td >StandardButton.Close</td><td >A <b>Close</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">RejectRole</a>.</td></tr>
<tr valign="top" class="even"><td >StandardButton.Discard</td><td >A <b>Discard</b> or <b>Don't Save</b> button, depending on the platform, defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">DestructiveRole</a>.</td></tr>
<tr valign="top" class="odd"><td >StandardButton.Apply</td><td >An <b>Apply</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">ApplyRole</a>.</td></tr>
<tr valign="top" class="even"><td >StandardButton.Reset</td><td >A <b>Reset</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">ResetRole</a>.</td></tr>
<tr valign="top" class="odd"><td >StandardButton.RestoreDefaults</td><td >A <b>Restore Defaults</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">ResetRole</a>.</td></tr>
<tr valign="top" class="even"><td >StandardButton.Help</td><td >A <b>Help</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">HelpRole</a>.</td></tr>
<tr valign="top" class="odd"><td >StandardButton.SaveAll</td><td >A <b>Save All</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
<tr valign="top" class="even"><td >StandardButton.Yes</td><td >A <b>Yes</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">YesRole</a>.</td></tr>
<tr valign="top" class="odd"><td >StandardButton.YesToAll</td><td >A <b>Yes to All</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">YesRole</a>.</td></tr>
<tr valign="top" class="even"><td >StandardButton.No</td><td >A <b>No</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">NoRole</a>.</td></tr>
<tr valign="top" class="odd"><td >StandardButton.NoToAll</td><td >A <b>No to All</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">NoRole</a>.</td></tr>
<tr valign="top" class="even"><td >StandardButton.Abort</td><td >An <b>Abort</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">RejectRole</a>.</td></tr>
<tr valign="top" class="odd"><td >StandardButton.Retry</td><td >A <b>Retry</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
<tr valign="top" class="even"><td >StandardButton.Ignore</td><td >An <b>Ignore</b> button defined with the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">AcceptRole</a>.</td></tr>
</table>
<p>For example the following dialog will show a calendar with the ability to save or cancel a date:</p>
<pre class="qml">import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Dialogs 1.2

<span class="type"><a href="qml-qtquick-dialogs-dialog.html">Dialog</a></span> {
    <span class="name">id</span>: <span class="name">dateDialog</span>
    <span class="name">visible</span>: <span class="number">true</span>
    <span class="name">title</span>: <span class="string">&quot;Choose a date&quot;</span>
    <span class="name">standardButtons</span>: <span class="name">StandardButton</span>.<span class="name">Save</span> <span class="operator">|</span> <span class="name">StandardButton</span>.<span class="name">Cancel</span>

    <span class="name">onAccepted</span>: <span class="name">console</span>.<span class="name">log</span>(<span class="string">&quot;Saving the date &quot;</span> <span class="operator">+</span>
        <span class="name">calendar</span>.<span class="name">selectedDate</span>.<span class="name">toLocaleDateString</span>())

    <span class="type">Calendar</span> {
        <span class="name">id</span>: <span class="name">calendar</span>
        <span class="name">onDoubleClicked</span>: <span class="name">dateDialog</span>.<span class="name">click</span>(<span class="name">StandardButton</span>.<span class="name">Save</span>)
    }
}</pre>
<p>The default is <tt>StandardButton.Ok</tt>.</p>
<p>The enum values are the same as in <a href="../qtwidgets/qmessagebox.html#StandardButton-enum">QMessageBox::StandardButtons</a>.</p>
</div></div><!-- @@@standardButtons -->
<br/>
<!-- $$$title -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="title-prop"></a><span class="name">title</span> : <span class="type"><a href="../qtqml/qml-string.html">string</a></span></p></td></tr></table></div><div class="qmldoc"><p>The title of the dialog window.</p>
</div></div><!-- @@@title -->
<br/>
<!-- $$$visible -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="visible-prop"></a><span class="name">visible</span> : <span class="type"><a href="../qtqml/qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds whether the dialog is visible. By default this is <tt>false</tt>.</p>
<p><b>See also </b><a href="qml-qtquick-dialogs-dialog.html#modality-prop">modality</a>.</p>
</div></div><!-- @@@visible -->
<br/>
<h2>Signal Documentation</h2>
<!-- $$$accepted -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="accepted-signal"></a><span class="name">accepted</span>()</p></td></tr></table></div><div class="qmldoc"><p>This signal is emitted by accept().</p>
<p>The corresponding handler is <tt>onAccepted</tt>.</p>
</div></div><!-- @@@accepted -->
<br/>
<!-- $$$apply -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="apply-signal"></a><span class="name">apply</span>()</p></td></tr></table></div><div class="qmldoc"><p>This signal is emitted when the user has pressed the <b>Apply</b> button.</p>
<p>The corresponding handler is <tt>onApply</tt>.</p>
</div></div><!-- @@@apply -->
<br/>
<!-- $$$discard -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="discard-signal"></a><span class="name">discard</span>()</p></td></tr></table></div><div class="qmldoc"><p>This signal is emitted when the user has pressed the <b>Discard</b> button.</p>
<p>The corresponding handler is <tt>onDiscard</tt>.</p>
</div></div><!-- @@@discard -->
<br/>
<!-- $$$help -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="help-signal"></a><span class="name">help</span>()</p></td></tr></table></div><div class="qmldoc"><p>This signal is emitted when the user has pressed the <b>Help</b> button. Depending on platform, the dialog may not be automatically dismissed because the help that your application provides may need to be relevant to the text shown in this dialog in order to assist the user in making a decision. However on other platforms it's not possible to show a dialog and a help window at the same time. If you want to be sure that the dialog will close, you can set <a href="qml-qtquick-dialogs-dialog.html#visible-prop">visible</a> to <tt>false</tt> in your handler.</p>
<p>The corresponding handler is <tt>onHelp</tt>.</p>
</div></div><!-- @@@help -->
<br/>
<!-- $$$no -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="no-signal"></a><span class="name">no</span>()</p></td></tr></table></div><div class="qmldoc"><p>This signal is emitted when the user has pressed any button which has the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">NoRole</a>: <b>No</b> or <b>No to All</b>.</p>
<p>The corresponding handler is <tt>onNo</tt>.</p>
</div></div><!-- @@@no -->
<br/>
<!-- $$$rejected -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="rejected-signal"></a><span class="name">rejected</span>()</p></td></tr></table></div><div class="qmldoc"><p>This signal is emitted by reject().</p>
<p>The corresponding handler is <tt>onRejected</tt>.</p>
</div></div><!-- @@@rejected -->
<br/>
<!-- $$$reset -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="reset-signal"></a><span class="name">reset</span>()</p></td></tr></table></div><div class="qmldoc"><p>This signal is emitted when the user has pressed any button which has the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">ResetRole</a>: <b>Reset</b> or <b>Restore Defaults</b>.</p>
<p>The corresponding handler is <tt>onReset</tt>.</p>
</div></div><!-- @@@reset -->
<br/>
<!-- $$$yes -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="yes-signal"></a><span class="name">yes</span>()</p></td></tr></table></div><div class="qmldoc"><p>This signal is emitted when the user has pressed any button which has the <a href="../qtwidgets/qmessagebox.html#ButtonRole-enum">YesRole</a>: <b>Yes</b> or <b>Yes to All</b>.</p>
<p>The corresponding handler is <tt>onYes</tt>.</p>
</div></div><!-- @@@yes -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$close -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="close-method"></a><span class="type">void</span> <span class="name">close</span>()</p></td></tr></table></div><div class="qmldoc"><p>Closes the dialog.</p>
</div></div><!-- @@@close -->
<br/>
<!-- $$$open -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="open-method"></a><span class="type">void</span> <span class="name">open</span>()</p></td></tr></table></div><div class="qmldoc"><p>Shows the dialog to the user. It is equivalent to setting <a href="qml-qtquick-dialogs-dialog.html#visible-prop">visible</a> to <tt>true</tt>.</p>
</div></div><!-- @@@open -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2014 Digia Plc and/or its
   subsidiaries. Documentation contributions included herein are the copyrights of
   their respective owners.<br>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br>    Digia, Qt and their respective logos are trademarks of Digia Plc     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>