<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
<div>If using Qt Quick Controls 2 (TWO) Dialog inherits from Popup which has the signals you need</div>
<div id="AppleMailSignature"><br>
</div>
<div id="AppleMailSignature"><a href="https://doc.qt.io/qt-5/qml-qtquick-controls2-popup.html">https://doc.qt.io/qt-5/qml-qtquick-controls2-popup.html</a></div>
<div id="AppleMailSignature"><br>
</div>
<div id="AppleMailSignature"><br>
<br>
Sent from my iPhone</div>
<div><br>
On Aug 21, 2017, at 1:17 PM, Igor Mironchik <<a href="mailto:igor.mironchik@gmail.com">igor.mironchik@gmail.com</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<p>Hi,</p>
<p>Let's say I have the next dialog in QML:</p>
<p><span style=" color:#800080;">Dialog</span><span style="
        color:#c0c0c0;">
</span>{ </p>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#800000;">id</span>:<span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#000000;">dlg</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#800000;">title</span>:<span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#0055af;">qsTr</span>(<span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"Dialog..."</span><span style=" color:#c0c0c0;"> </span>)</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#800000;">standardButtons</span>:<span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">StandardButton</span>.Ok</pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#800080;">Text</span><span style=" color:#c0c0c0;"> </span>{</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">            </span><span style=" color:#800000;">anchors.centerIn</span>:<span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#000000;">parent</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">            </span><span style=" color:#800000;">font.pixelSize</span>:<span style=" color:#c0c0c0;"> </span>30</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">            </span><span style=" color:#800000;">font.bold</span>:<span style=" color:#c0c0c0;"> </span>true</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">            </span><span style=" color:#800000;">text</span>:<span style=" color:#c0c0c0;"> </span><span style=" color:#c0c0c0;"></span><span style=" font-style:italic; color:#0055af;">qsTr</span>(<span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">"Text"</span><span style=" color:#c0c0c0;"> </span>)<span style=" color:#c0c0c0;"></span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">        </span>}</pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">        </span><span style=" color:#800000;">onAccepted</span>:<span style=" color:#c0c0c0;"> </span>{<span style=" color:#c0c0c0;"> </span><span style=" font-style:italic; color:#000000;">doSomething()</span><span style=" color:#c0c0c0;"> </span>}</pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span>}

This is nice. But how can I handle closing dialog, i.e. when user clicks on X window button?

Thank you.
</pre>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top: 1px solid #D3D4DE;">
<tbody>
<tr>
<td style="width: 55px; padding-top: 13px;"><a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png" alt="" width="46" height="29" style="width: 46px; height: 29px;"></a></td>
<td style="width: 470px; padding-top: 12px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">
Virus-free. <a href="http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">
www.avg.com</a> </td>
</tr>
</tbody>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"></a></div>
</div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>Interest mailing list</span><br>
<span><a href="mailto:Interest@qt-project.org">Interest@qt-project.org</a></span><br>
<span><a href="http://lists.qt-project.org/mailman/listinfo/interest">http://lists.qt-project.org/mailman/listinfo/interest</a></span><br>
</div>
</blockquote>
</body>
</html>