import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Dialogs 1.2 import QtQuick.Window 2.12 Window { width: 500 height: 500 visible: true Column { anchors.fill: parent spacing: 10 Row { spacing: 10 Button { text: "Open File Dialog" onClicked: fileDialog.open() } Button { text: "Open Message Dialog" onClicked: messageDialog.open() } } Rectangle { anchors.left: parent.left anchors.right: parent.right height: 200 color: dropArea.containsDrag ? "skyblue" : "#eee" Text { anchors.centerIn: parent text: "drop here" } DropArea { id: dropArea anchors.fill: parent } } Rectangle { anchors.left: parent.left anchors.right: parent.right height: 200 color: mouseArea.containsMouse ? "skyblue" : "#eee" Text { anchors.centerIn: parent text: "hover here" } MouseArea { id: mouseArea anchors.fill: parent hoverEnabled: true } } } FileDialog { id: fileDialog modality: Qt.ApplicationModal } MessageDialog { id: messageDialog text: "blah blah" } }