[SOLVED] capture the output of a class
Hello,
I have the following code,
- void Hello::sayHello()
- {
- qDebug() << "foo";
- someOtherObject->aMethodWhichPrintsSomethingInSTDOUT();
- }
I want to capture the following output in qwidget like qtcreator does.
The above code isn’t a separate application, it lives in same application
in which i want to print the output into the qwidget.
Any hints?
thanks in advance
4 replies
Were you looking for the qInstallMsgHandler() function?
Not exactly.
qinstallMsgHandler can give me the output from a function like,
- void myMessageOutput(QtMsgType type, const char *msg)
My debug output doesn’t come from methods like this, but it comes from the qDebug macro.
Is there a way to capture that output?
You must log in to post a reply. Not a member yet? Register here!


