aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/snippets/qml/integrating-javascript/scarceresources/exampleOne.qml
blob: 76b161fe2691880d77d760457dfdd898448fd41a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//![0]
// exampleOne.qml
import QtQuick
import Qt.example

QtObject {
    property AvatarExample a;
    a: AvatarExample { id: example }
    property var avatarWidth: example.avatar,100
    // Here, we use "example.avatar,100" purely for illustration.
    // The value of `avatarWidth' will be 100 after evaluation.
    // E.g., you could imagine some js function which takes
    // an avatar, and returns the width of the avatar.
}
//![0]