Ashot
Ashot

Reputation: 10979

Configure wrapping of QTextEdit to add indent

By default QTextEdit wraps long string and displays part of string starting at the beginning of new line. Is it possible to configure the widget so it displays wrapped text after a tabulation in new line?

Upvotes: 1

Views: 1763

Answers (1)

Ashot
Ashot

Reputation: 10979

It can be done using these functions

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

Upvotes: 2

Related Questions