diff options
Diffstat (limited to 'src/qml/doc/snippets/qmltc/special/HelloWorld.qml')
-rw-r--r-- | src/qml/doc/snippets/qmltc/special/HelloWorld.qml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/qml/doc/snippets/qmltc/special/HelloWorld.qml b/src/qml/doc/snippets/qmltc/special/HelloWorld.qml new file mode 100644 index 0000000000..ca2a4bc015 --- /dev/null +++ b/src/qml/doc/snippets/qmltc/special/HelloWorld.qml @@ -0,0 +1,19 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +//! [qmltc-hello-world-qml] +// HelloWorld.qml +import QtQml + +QtObject { + id: me + property string hello: "Hello, qmltc!" + + function printHello(prefix: string, suffix: string) { + console.log(prefix + me.hello + suffix); + } + + signal created() + Component.onCompleted: me.created(); +} +//! [qmltc-hello-world-qml] |