user363778
user363778

Reputation:

QTextEdit::setTextFormat(Qt::LogText) does not exist anymore, what else can I use to log?

I need a text logger in my C++ application, QTextEdit used to have this feature until Qt 3.3 but unfortunately it has been removed. Is there an alternative that I could use?

Upvotes: 5

Views: 3315

Answers (2)

Jérôme
Jérôme

Reputation: 27027

It seems to me that QPlainTextEdit is what you are looking for.

It is optimized for dealing with plain text data and can be can put it in read only.

Upvotes: 3

Greg S
Greg S

Reputation: 12538

Two options:

  1. You could simply use QTextEdit::setReadOnly(true), the old Qt::LogText flag basically just put the QTextEdit in plain-text read-only mode.
  2. Or use Q3TextEdit, the Qt4 compatibility class for the old Qt3 QTextEdit.

Upvotes: 4

Related Questions