2

我正在尝试将所有控制台输出消息打印到 QLabel 或 QTextBrowser。有谁知道如何做到这一点?

谢谢你的帮助,

简历

4

1 回答 1

2

I found a solution at http://lists.trolltech.com/qt-interest/2005-06/thread00166-0.html that allows for a syntax like:

QDebugStream qout(std::cout, myTextEdit);
std::cout << "Send this to the Text Edit!" << endl;

I hope this will be useful for you. If it is not exactly what you mean, probably you can adapt it to your exact case.

于 2011-10-03T15:11:36.423 回答