Where is the log file from qDebug(), or how can I enable it on s60?
Pawel
Where is the log file from qDebug(), or how can I enable it on s60?
Pawel
Hi,
You can control qDebug messages by installing a Qt message handler
http://doc.trolltech.com/4.5/qtgloba...tallMsgHandler
Code:void debugOutput(QtMsgType type, const char *msg) { switch (type) { case QtDebugMsg: QFile file("C:\\Data\\debug.txt"); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) return; QTextStream out(&file); out << "Debug: "; out << msg; break; .... //the rest of the message types } } int main(int argc, char *argv[]) { qInstallMsgHandler(debugOutput); ..... }
You can also forward them to be shown in message boxes on the phone by adding QErrorMessage::qtHandler() to your main.cpp. Only do this if you use some qDebug-statements and not have qdebug in every second line of code because you will end up dissmissing a lot of popups.