1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 11:45:53 +01:00
GPXSee/src/main.cpp

33 lines
839 B
C++
Raw Normal View History

#include <QtGlobal>
#include <QSurfaceFormat>
2017-11-26 18:54:03 +01:00
#include "GUI/app.h"
#include "GUI/timezoneinfo.h"
2015-10-05 01:43:48 +02:00
int main(int argc, char *argv[])
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
2018-08-18 21:06:36 +02:00
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
qRegisterMetaTypeStreamOperators<TimeZoneInfo>("TimeZoneInfo");
#else // QT6
qRegisterMetaType<TimeZoneInfo>("TimeZoneInfo");
#endif // QT6
2018-08-18 21:06:36 +02:00
QSurfaceFormat fmt;
fmt.setProfile(QSurfaceFormat::CoreProfile);
#ifdef Q_OS_ANDROID
fmt.setRenderableType(QSurfaceFormat::OpenGLES);
#else // Android
fmt.setVersion(3, 2);
fmt.setRenderableType(QSurfaceFormat::OpenGL);
#endif // Android
fmt.setDepthBufferSize(24);
fmt.setStencilBufferSize(8);
fmt.setSamples(4);
QSurfaceFormat::setDefaultFormat(fmt);
App app(argc, argv);
return app.run();
2015-10-05 01:43:48 +02:00
}