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

公共变量

QChar delimiter
qreal position
QTextOption::TabType type

详细说明

每个选项卡定义都由该结构表示。

成员函数文档

Tab::Tab()

创建位置为 80 的默认左标签页。

Tab::Tab(qreal pos, QTextOption::TabType tabType, QChar delim = QChar())

以给定的位置、制表符类型和分隔符 (pos,tabType,delim) 创建制表符。

注意: delim 仅在tabTypeDelimiterTab 时使用。

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 ,反之亦然。

© 2025 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.