#include <QApplication>
#include <QtGui>
#include <QtGlobal>
#include "mainwindow.h"
#define DEBUG_TEST
#ifdef DEBUG_TEST
void crashMessageOutput(QtMsgType type, const char *msg)
{
switch (type)
{
case QtDebugMsg:
fprintf(stderr, "Debug: %s\n", msg);
break;
case QtWarningMsg:
fprintf(stderr, "Warning: %s\n", msg);
break;
case QtCriticalMsg:
fprintf(stderr, "Critical: %s\n", msg);
break;
case QtFatalMsg:
fprintf(stderr, "Fatal: %s\n", msg);
abort();
}
}
#endif
int main(int argc, char *argv[])
{
#ifdef DEBUG_TEST
qInstallMsgHandler(crashMessageOutput);
#endif
MainWindow theMainWindow;
theMainWindow.show();
return app.exec();
}
#include <QApplication>
#include <QtGui>
#include <QtGlobal>
#include "mainwindow.h"
#define DEBUG_TEST
#ifdef DEBUG_TEST
void crashMessageOutput(QtMsgType type, const char *msg)
{
switch (type)
{
case QtDebugMsg:
fprintf(stderr, "Debug: %s\n", msg);
break;
case QtWarningMsg:
fprintf(stderr, "Warning: %s\n", msg);
break;
case QtCriticalMsg:
fprintf(stderr, "Critical: %s\n", msg);
break;
case QtFatalMsg:
fprintf(stderr, "Fatal: %s\n", msg);
abort();
}
}
#endif
int main(int argc, char *argv[])
{
#ifdef DEBUG_TEST
qInstallMsgHandler(crashMessageOutput);
#endif
QApplication app(argc, argv);
MainWindow theMainWindow;
theMainWindow.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks