import QtQuick 2.9 import QtQuick.Window 2.0 import QtQuick.Controls 2.3 ApplicationWindow { id: window visible: true width: 600 height: 600 Dialog { id: dialog width: 300 height: 300 enter: Transition { NumberAnimation { properties: "x,y"; from: -300; to: 150; duration: 5000 } } exit: Transition { NumberAnimation { properties: "x,y"; to: 600; duration: 5000 } } Button { text: 'close' anchors.centerIn: parent onClicked: dialog.close() } } Button { text: 'open' anchors.centerIn: parent onClicked: dialog.open() } }