diff options
Diffstat (limited to 'examples/scxml/invoke/SubView.qml')
-rw-r--r-- | examples/scxml/invoke/SubView.qml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/scxml/invoke/SubView.qml b/examples/scxml/invoke/SubView.qml new file mode 100644 index 0000000..413227b --- /dev/null +++ b/examples/scxml/invoke/SubView.qml @@ -0,0 +1,26 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick + +Item { + // "anywhere" is a context property, so we always have to check if it's null + Button { + id: here + enabled: anywhere ? anywhere.here : false + text: "Go There" + width: parent.width / 2 + height: parent.height + onClicked: anywhere.submitEvent("goThere") + } + + Button { + id: there + enabled: anywhere ? anywhere.there : false + text: "Go Here" + width: parent.width / 2 + height: parent.height + x: width + onClicked: anywhere.submitEvent("goHere") + } +} |