【发布时间】:2021-05-18 07:13:38
【问题描述】:
我正在尝试在 QML 中显示一条水平线,并支持 HTML 4 子集。
不幸的是,我无法显示该行。例如下面的代码,不显示水平线。
我尝试了不同版本的 hr-tag:<hr>、<hr/>、<hr></hr>。但到目前为止,它们都没有工作。
import QtQuick 2.12
import QtQuick.Window 2.12
Window {
id: root
width: 640
height: 480
visible: true
Text {
anchors.fill: parent
textFormat: Text.RichText
text: "Hello<hr>Hello"
}
}
任何想法如何解决这个问题?
【问题讨论】: