【问题标题】:Configure wrapping of QTextEdit to add indent配置 QTextEdit 的换行以添加缩进
【发布时间】:2014-09-30 20:17:14
【问题描述】:

默认情况下QTextEdit 包装长字符串并显示从新行开头开始的部分字符串。是否可以配置小部件,使其在换行后显示换行的文本?

【问题讨论】:

  • 听起来很具体 - 可能更容易转换文本(例如 1. 检查第一行中的字符数,2. 插入制表符,3. 检查剩余符号,4. 插入制表符,等等)。

标签: c++ qt word-wrap qtextedit


【解决方案1】:

可以使用这些功能来完成

void QTextBlockFormat::setIndent ( int indentation )
void QTextCursor::setBlockFormat ( const QTextBlockFormat & format )

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-12
    • 1970-01-01
    • 2011-09-07
    • 2022-08-13
    相关资源
    最近更新 更多