[Interest] QML Dialog -> onClosing

Andrew Ialacci andrew at dkai.dk
Mon Aug 21 13:47:24 CEST 2017

If using Qt Quick Controls 2 (TWO) Dialog inherits from Popup which has the signals you need


Sent from my iPhone

On Aug 21, 2017, at 1:17 PM, Igor Mironchik <igor.mironchik at gmail.com<mailto:igor.mironchik at gmail.com>> wrote:


Let's say I have the next dialog in QML:

Dialog {

        id: dlg

        title: qsTr( "Dialog..." )

        standardButtons: StandardButton.Ok

        Text {

            anchors.centerIn: parent

            font.pixelSize: 30

            font.bold: true

            text: qsTr( "Text" )


        onAccepted: { doSomething() }


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

Thank you.

[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png]<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> Virus-free. www.avg.com<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
Interest mailing list
Interest at qt-project.org<mailto:Interest at qt-project.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170821/49363461/attachment.html>

More information about the Interest mailing list