QTextOption::Tab Struct
struct QTextOption::Tab公共函数
| Tab() | |
| Tab(qreal pos, QTextOption::TabType tabType, QChar delim = QChar()) | |
| bool | operator!=(const QTextOption::Tab &other) const |
| bool | operator==(const QTextOption::Tab &other) const |
公共变量
成员函数文档
Tab::Tab()
创建一个默认左对齐的制表符,位置为 80。
Tab::Tab(qreal pos, QTextOption::TabType tabType, QChar delim = QChar())
创建一个具有指定位置、制表符类型和分隔符(pos 、tabType 、delim )的制表符。
注意: delim 仅在tabType 为DelimiterTab 时才被使用。
bool Tab::operator!=(const QTextOption::Tab &other) const
如果标签other 不等于该标签,则返回true ;否则返回false 。
bool Tab::operator==(const QTextOption::Tab &other) const
如果标签other 与该标签相等,则返回true ;否则返回false 。
成员变量文档
QChar Tab::delimiter
如果类型为 DelimitorTab,则在文本中搜索该字符,直到找到该字符为止。
qreal Tab::position
距段落起始处的距离。制表符的位置以段落起始处为基准,这意味着当段落对齐方式设置为居中时,系统会将制表符的移动距离解释为与段落左边缘的移动距离相同。 如果段落的 layoutDirection() 设置为 RightToLeft,则该位置被解释为从段落的右侧开始,数值越大,制表位向左移动的距离就越大。
QTextOption::TabType Tab::type
确定使用的是哪种类型。在布局方向(layoutDirection())为 RightToLeft 的段落中,类型LeftTab 将被解释为RightTab ,反之亦然。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.