Hello! Jpn Sir,
Thanks Sir for suggesting me that tool but i think it will print the debug information whereas i want to print the cout's in my file to logwindow.
Also I searched the forum from where i got to see from here that i can use qdebug.h or qdebugstream.h headers to do the needful.
In this post Wysota Sir has mentioned
{Alternatively make your own streaming class that inherits std:: ostream and outputs everything using qDebug or some completely different mechanism. Then undefine cout and substitute it with your own.} So how do i do that? Do i have to use qdebugstream.h and implement my code or something else?
Also if those headers are used am confused about few things like with: -
QDebugStream cout(std::cout, QTextEdit* text_edit);
QDebugStream cerr(std::cerr,QTextEdit* text_edit);
Will it print all the cout's & cerr's to text_edit, i mean as in my case will it print cout<<"We have started Calculation"( written in my Square.cpp which is subclassed to Sample.cpp) to logTextEdit in my GUI?
Also will it print to textedit widget added to my GUI or to a separate QTextEdit widget like a popup or QMessageBox or something likethat?
Thanks again.![]()
Bookmarks