summaryrefslogtreecommitdiffstats
path: root/examples/remoteobjects/clientapp/plugins0.qml
blob: 99b132a1de58e5083e71db29e6395cb4474950d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (C) 2017 Ford Motor Company
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//![0]
import QtQuick
import QtRemoteObjects
import TimeExample // import types from the plugin

Rectangle {
    width: 200
    height: 400
    color: "blue"

    Node {
        id: node
        registryUrl: "local:registry"
    }

    Time { // this class is defined in C++
        id: time
        node: node
    }

    Text {
        id: validity; font.bold: true; font.pixelSize: 14; y:200; color: "white"
        anchors.horizontalCenter: parent.horizontalCenter
        text: time.state == Time.Valid ? "Click to see a clock!" : "Server not found"
    }
}
//![0]