diff options
Diffstat (limited to 'src/qml/doc/snippets/qml/qml-documents/Images.qml')
-rw-r--r-- | src/qml/doc/snippets/qml/qml-documents/Images.qml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/qml/doc/snippets/qml/qml-documents/Images.qml b/src/qml/doc/snippets/qml/qml-documents/Images.qml new file mode 100644 index 0000000000..613e223b34 --- /dev/null +++ b/src/qml/doc/snippets/qml/qml-documents/Images.qml @@ -0,0 +1,37 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +//! [document] +// Images.qml +import QtQuick + +Item { + component LabeledImage: Column { + property alias source: image.source + property alias caption: text.text + + Image { + id: image + width: 50 + height: 50 + } + Text { + id: text + font.bold: true + } + } + + Row { + LabeledImage { + id: before + source: "before.png" + caption: "Before" + } + LabeledImage { + id: after + source: "after.png" + caption: "After" + } + } + property LabeledImage selectedImage: before +} +//! [document] |