سؤال

Am trying to print all console output messages to a QLabel or QTextBrowser. 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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top