Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Destroying dynamically created Dialogs

Destroying dynamically created Dialogs

Scheduled Pinned Locked Moved QML and Qt Quick
dialogsqmldesktop
1 Posts 1 Posters 797 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hernan Martinez
    wrote on 14 Jul 2015, 23:12 last edited by Hernan Martinez
    #1

    Hello.
    Right now I can't find anything equivalent to Qt::WA_DeleteOnClose from the Widget world for Qt Quick based Windows and Dialog.
    I have this Dialog:

    import QtQuick 2.5
    import QtQuick.Dialogs 1.2
    import QtQuick.Controls 1.4
    Dialog {
        id: dialog
    
        contentItem: Button {
            anchors.fill: parent
            text: "OK"
            onClicked: {
                dialog.destroy()
            }
        }
    }
    

    And I'm creating it dynamically with:

    var component = Qt.createComponent("MyDialog.qml")
    var obj = component.createObject()
    

    Besides calls to the destroy() method when the user clicks the Ok button what about the user clicking the top right X button? Will the memory be released?

    Thank you

    1 Reply Last reply
    0

    1/1

    14 Jul 2015, 23:12

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved