Por algum motivo, funciona usando Timer
, ou seja:
Rectangle {
id: rect
height: 600
width: height
Component.onCompleted: {
start_timer.start()
}
Timer {
id: start_timer
interval: 200;
onTriggered: PopupUtils.open(dialog, rect)
}
Component {
id: dialog
Dialog {
id: dialogue
title: "Save file"
text: "Are you sure that you want to save this file?"
Button {
text: "cancel"
onClicked: PopupUtils.close(dialogue)
}
Button {
text: "overwrite previous version"
color: "orange"
onClicked: PopupUtils.close(dialogue)
}
Button {
text: "save a copy"
color: "orange"
onClicked: PopupUtils.close(dialogue)
}
}
}