QTextEdit :: setTextFormat(Qt :: LogText)不再存在,还有什么可以使用日志吗? [英] QTextEdit::setTextFormat(Qt::LogText) does not exist anymore, what else can I use to log?

查看:2353
本文介绍了QTextEdit :: setTextFormat(Qt :: LogText)不再存在,还有什么可以使用日志吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个文本记录器在我的C + +应用程序, QTextEdit 用于有这个功能,直到Qt 3.3,但不幸的是它已被删除。

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?

推荐答案

两个选项:


  1. 您可以简单地使用
    QTextEdit :: setReadOnly(true)
    old Qt :: LogText 标志基本上只是
    将纯文本
    只读模式中的 QTextEdit >
  2. 或使用 Q3TextEdit ,Qt4
    兼容性类为旧的Qt3 QTextEdit

  1. You could simply use QText: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.

这篇关于QTextEdit :: setTextFormat(Qt :: LogText)不再存在,还有什么可以使用日志吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆