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.
精彩评论