Hi, I just tested it myself, works like it should be with Qt 5.2.1, you don’t need to add any special libraries or modules in the project file. My test code:
import QtQuick 2.2
import QtQuick.Dialogs 1.1
Rectangle {
width: 300
height: 300
Component.onCompleted: messageDialog.open()
MessageDialog {
id: messageDialog
title: "May I have your attention please"
text: "It's so cool that you are using Qt Quick."
}
}
that is all.. be aware that QtQuick.Dialogs is a dynamic QML plugin, so if you deploy your app and don’t run that code from Qt Creator you have to deploy the QtQuick.Dialogs plugin with your app, obviously. :)
↧