diff options
author | Øystein Heskestad <oystein.heskestad@qt.io> | 2023-07-10 12:20:50 +0200 |
---|---|---|
committer | Øystein Heskestad <oystein.heskestad@qt.io> | 2023-09-14 18:27:09 +0200 |
commit | cad16240256a2b06dd933af30f77787315424b25 (patch) | |
tree | 87563ed8a96a29d63389d0445847b595a4b8ed2a /examples/remoteobjects/clientapp/Plugins.qml | |
parent | 3f6a4b27b3056aeb2ea49d9ff73ba90d9f06c328 (diff) |
Revamp clientapp example to prefer QML types over C++ classes
Replace C++ with more succinct QML.
Task-number: QTBUG-112850
Change-Id: Ibd3ddcafdee0e6a47e83612cd11873a1656e7844
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'examples/remoteobjects/clientapp/Plugins.qml')
-rw-r--r-- | examples/remoteobjects/clientapp/Plugins.qml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/remoteobjects/clientapp/Plugins.qml b/examples/remoteobjects/clientapp/Plugins.qml new file mode 100644 index 0000000..5273352 --- /dev/null +++ b/examples/remoteobjects/clientapp/Plugins.qml @@ -0,0 +1,24 @@ +// Copyright (C) 2017 Ford Motor Company +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick + +Window { + id: window + width: 200 + height: 400 + visible: true + property int counter: 0; + MouseArea { + anchors.fill: parent + onClicked: + { + window.counter = (window.counter + 1) % 3; + pageLoader.source = "plugins"+window.counter+".qml" + } + } + Loader { + id: pageLoader + source: "plugins0.qml" + } +} |