1
0
Fork 0
VideoPlayer/src/main.cpp

39 lines
868 B
C++
Raw Normal View History

2018-10-13 15:38:31 +01:00
#include <stdexcept>
#include <clocale>
#include "config.h"
#include "mpvobject.h"
#include <QApplication>
#include <QGuiApplication>
#include <QMainWindow>
#include <QQmlApplicationEngine>
#include <QObject>
#include <QWidget>
#include <QtGui/QOpenGLFramebufferObject>
#include <QQuickView>
int main( int argc, char *argv[] )
{
setenv("QT_QUICK_CONTROLS_STYLE","Desktop",1);
QApplication app(argc, argv);
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
qmlRegisterType<MpvObject>("player", 1, 0, "MpvObject");
std::setlocale(LC_NUMERIC, "C");
/*QQuickView *view = new QQuickView();
view->setResizeMode(QQuickView::SizeRootObjectToView);
view->setSource(QUrl("qrc:///player/main.qml"));
view->show();*/
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:///player/main.qml")));
return app.exec();
}