diff options
Diffstat (limited to 'src/quick/doc/snippets/qml/text/textFormats.qml')
-rw-r--r-- | src/quick/doc/snippets/qml/text/textFormats.qml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/quick/doc/snippets/qml/text/textFormats.qml b/src/quick/doc/snippets/qml/text/textFormats.qml new file mode 100644 index 0000000000..d79bcb01bb --- /dev/null +++ b/src/quick/doc/snippets/qml/text/textFormats.qml @@ -0,0 +1,28 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause +import QtQuick + +//![0] +Column { + Text { + font.pointSize: 24 + text: "<b>Hello</b> <i>World!</i>" + } + Text { + font.pointSize: 24 + textFormat: Text.RichText + text: "<b>Hello</b> <i>World!</i>" + } + Text { + font.pointSize: 24 + textFormat: Text.PlainText + text: "<b>Hello</b> <i>World!</i>" + } + Text { + font.pointSize: 24 + textFormat: Text.MarkdownText + text: "**Hello** *World!*" + } +} +//![0] + |