开发者

How to print std::cout messages to QLabel or QTextBrowser

Am trying to print all console output messages to a QLabel or QText开发者_开发知识库Browser. Does anyone know how to do this?

Thanks for any help,

CV


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜