Advertisement
Guest User

Untitled

a guest
Jan 12th, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <QtCore/QCoreApplication>
  2. #include <QDebug>
  3. #include <iostream>
  4.  
  5. void msgHandler( QtMsgType type, const char* msg )
  6. {
  7. const char symbols[] = { 'I', 'E', '!', 'X' };
  8. QString output = QString("[%1] %2").arg( symbols[type] ).arg( msg );
  9. std::cerr << output.toStdString() << std::endl;
  10. if( type == QtFatalMsg ) abort();
  11. }
  12.  
  13. int main(int argc, char *argv[])
  14. {
  15. qInstallMsgHandler( msgHandler );
  16. .....
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement