import QtQuick
import QtQuick.Controls
//其他
color: color
antialiasing: bool
//抗锯齿,只有renderType of Text.NativeRendering 的文本才能禁用
//默认 true
baseUrl: url
//指定一个基础 URL,用于解析文本中的相对 URL
//基础 URL:http://qt-project.org/
//相对 URL:images/logo.png
//解析后 URL:http://qt-project.org/images/logo.png
//基础 URL:http://qt-project.org/content/index.html
//相对 URL:../images/logo.png
//解析后 URL:http://qt-project.org/images/logo.png
clip: bool
//是否被剪切
//如果文本不适合边界矩形,就会被突然剪切
//默认 false
font.contextFontMerging: bool
//如果字体缺少字符,会查找包含该字符的相似字体
//会逐个查找,代价用性能,获得更好的一致性
//默认 false
//尺寸
width: parent.width; height: parent.height
//需指定宽高才能使用对齐、换行等
lineHeightMode: Text.FixedHeight
//固定行高,像素单位
lineHeightMode: Text.ProportionalHeight
//比例行高,表示几倍行高,默认
lineHeight: real
//文本的行高,根据lineHeightMode 赋值
maximumLineCount: int
//限制文本项显示的行数,不适用于富文本
//链接
linkColor: color //链接颜色,不适用于富文本
//字体大小
font.pixelSize: int
//像素单位(适合精准控制),不受设备字体大小影响
font.pointSize: int
//点单位(适合统一比例)
minimumPixelSize: int
//按fontSizeMode 属性缩放的文本的最小字体像素大小
//fontSizeMode 为 Text.FixedSize,或font.pixelSize 为-1,此设置无效
minimumPointSize: int
//按fontSizeMode 属性缩放的文本的最小字体点大小
//fontSizeMode 为 Text.FixedSize,或font.pixelSize 为-1,此设置无效
fontSizeMode: enumeration //如何确定显示文本的字体大小
//最小边界由minimumPointSize 或minimumPixelSize 属性指定
//最大边界由font.pixelSize 或font.pointSize 属性指定
fontSizeMode: Text.FixedSize //默认
//使用font.pixelSize 或font.pointSize 指定的大小
fontSizeMode: Text.HorizontalFit
//使用适合项目宽度的最大字体大小,直至指定的字体大小,且不包边
fontSizeMode: Text.VerticalFit
//使用适合项目高度的最大尺寸,直至指定的尺寸
fontSizeMode: Text.Fit
//使用适合项目宽度和高度的最大尺寸,直至指定的尺寸
//字体权重,两种值均可(左右值为对应关系)
font.weight: int
font.weight: 100 font.weight: Font.Thin
font.weight: 200 font.weight: ExtraLight
font.weight: 300 font.weight: Font.Light
font.weight: 400 font.weight: Font.Normal //默认
font.weight: 500 font.weight: Font.Medium
font.weight: 600 font.weight: Font.DemiBold
font.weight: 700 font.weight: Font.Bold
font.weight: 800 font.weight: Font.ExtraBold
font.weight: 900 font.weight: Font.Black
//文本格式
text: qsTr("文\n本") //纯文本
//支持换行符 \n
text: qsTr("Hello World!") //富文本
//支持有限html标签
text: qsTr("See the Qt Project website.") //嵌入链接
//支持有限html标签
font.family: "宋体"
//字体名不区分大小写
font.letterSpacing: real
//字母间距,允许 负值
font.wordSpacing: real
//字体或单词间距,允许 负值
elide: enumeration //长文本省略方式,不适用 富文本
elide: Text.ElideNone //默认
elide: Text.ElideLeft //省略左边
elide: Text.ElideMiddle //省略中间
elide: Text.ElideRight //省略右边
font.bold: bool //粗体
font.italic: bool //斜体
font.strikeout: bool //删除线
font.underline: bool //下划线
font.capitalization: enumeration //大小写
font.capitalization: Font.MixedCase //不改变,默认
font.capitalization: Font.AllUppercase //改为大写
font.capitalization: Font.AllLowercase //改为小写
font.capitalization: Font.SmallCaps //小写改为大写,并且字体变小,大写不变
font.capitalization: Font.Capitalize //单词首字母大写
//支持有限html标签
//换行
wrapMode: enumeration
wrapMode: Text.NoWrap //不换行,默认
wrapMode: Text.WordWrap //仅单词边界换行,即不拆分单词
wrapMode: Text.WrapAnywhere //拆分单词换行
wrapMode: Text.Wrap
//与 Text.WordWrap 类似,优先不拆分换行,再拆分换行(单词较长时)
//text 属性显示方式
textFormat: enumeration
textFormat: Text.AutoText
//通过Qt::mightBeRichText() 启发式检测,默认
textFormat: Text.PlainText
//所有样式标记都被视为纯文本
textFormat: Text.StyledText
//HTML 3.2 中经过优化的基本富文本格式
textFormat: Text.RichText
//HTML 4 的子集
textFormat: Text.MarkdownText
//CommonMark加上用于表格和任务列表的GitHub扩展
//附加文本样式
style: enumeration
style: Text.Normal //默认
style: Text.Outline
style: Text.Raised
style: Text.Sunken
styleColor: color //附加样式颜色,轮廓颜色
//对齐
//水平对齐
horizontalAlignment: Text.AlignHCenter
horizontalAlignment: Text.AlignLeft
horizontalAlignment: Text.AlignRight
horizontalAlignment: Text.AlignJustify //均匀散开
//垂直对齐
verticalAlignment: Text.AlignVCenter
verticalAlignment: Text.AlignTop
verticalAlignment: Text.AlignBottom
//padding
padding: real
topPadding: real
bottomPadding: real
leftPadding: real
rightPadding: real