2014-03-03 11:27:25 -05:00
|
|
|
#ifdef QT5
|
|
|
|
#include <QtWidgets>
|
|
|
|
#else
|
2012-05-22 13:09:48 -04:00
|
|
|
#include <QtGui>
|
2014-03-03 11:27:25 -05:00
|
|
|
#endif
|
|
|
|
#include <QApplication>
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
#include "mainwindow.h"
|
|
|
|
|
2021-04-10 07:25:28 -04:00
|
|
|
static QtMessageHandler default_message_handler;
|
|
|
|
|
|
|
|
void my_message_handler (QtMsgType type, QMessageLogContext const& context, QString const& msg)
|
|
|
|
{
|
|
|
|
// Handle the messages!
|
|
|
|
|
|
|
|
// Call the default handler.
|
|
|
|
(*default_message_handler) (type, context, msg);
|
|
|
|
}
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2021-04-10 07:25:28 -04:00
|
|
|
default_message_handler = qInstallMessageHandler (my_message_handler);
|
|
|
|
|
|
|
|
QApplication a {argc, argv};
|
|
|
|
MainWindow w;
|
|
|
|
w.show ();
|
|
|
|
return a.exec ();
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|