1
#include <QtGui/QApplication>
8
//temp code to redirect qDebug to a file which can be handy for real debugging.
9
void messageHandler(QtMsgType type, const char *msg)
14
txt = QString("Debug: %1").arg(msg);
17
txt = QString("Warning: %1").arg(msg);
20
txt = QString("Critical: %1").arg(msg);
23
txt = QString("Fatal: %1").arg(msg);
27
QFile outFile("/home/david/temp/log");
28
outFile.open(QIODevice::WriteOnly | QIODevice::Append);
29
QTextStream ts(&outFile);
33
int main(int argc, char *argv[])
35
QApplication app(argc, argv);
36
// qInstallMsgHandler(messageHandler);