Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QtCore/QCoreApplication>
- #include <QDebug>
- #include <iostream>
- void msgHandler( QtMsgType type, const char* msg )
- {
- const char symbols[] = { 'I', 'E', '!', 'X' };
- QString output = QString("[%1] %2").arg( symbols[type] ).arg( msg );
- std::cerr << output.toStdString() << std::endl;
- if( type == QtFatalMsg ) abort();
- }
- int main(int argc, char *argv[])
- {
- qInstallMsgHandler( msgHandler );
- .....
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement