// Copyright (C) 2017 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause import QtQuick Rectangle { id: main width: 320; height: 480 focus: true color: "#dedede" property int hAlign: Text.AlignLeft Flickable { anchors.fill: parent contentWidth: parent.width contentHeight: col.height + 20 Column { id: col x: 10; y: 10 spacing: 20 width: parent.width - 20 property int hAlign: main.hAlign TextWithImage { text: "This is a happy face" } TextWithImage { text: "This is a veryhappy face vertically aligned in the middle." } TextWithImage { text: "This is a tinyhappy face." } TextWithImage { text: "This is aaligned to the top and aaligned to the bottom." } TextWithImage { text: "Qt logosaligned in the middle with different sizes." } TextWithImage { text: "Some hearts with different sizes." } TextWithImage { text: "Resized imagefrom the internet." } TextWithImage { text: "Imagefrom the internet." } TextWithImage { height: 120 verticalAlignment: Text.AlignVCenter text: "This is a happy face with an explicit height." } } } Keys.onUpPressed: main.hAlign = Text.AlignHCenter Keys.onLeftPressed: main.hAlign = Text.AlignLeft Keys.onRightPressed: main.hAlign = Text.AlignRight }