summaryrefslogtreecommitdiffstats
path: root/DOCS/client_api_examples/qml/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'DOCS/client_api_examples/qml/main.cpp')
-rw-r--r--DOCS/client_api_examples/qml/main.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/DOCS/client_api_examples/qml/main.cpp b/DOCS/client_api_examples/qml/main.cpp
new file mode 100644
index 0000000000..cc86302be6
--- /dev/null
+++ b/DOCS/client_api_examples/qml/main.cpp
@@ -0,0 +1,19 @@
+#include <QGuiApplication>
+
+#include <QtQuick/QQuickView>
+
+#include "mpvrenderer.h"
+
+int main(int argc, char **argv)
+{
+ QGuiApplication app(argc, argv);
+
+ qmlRegisterType<MpvObject>("mpvtest", 1, 0, "MpvObject");
+
+ QQuickView view;
+ view.setResizeMode(QQuickView::SizeRootObjectToView);
+ view.setSource(QUrl("qrc:///mpvtest/main.qml"));
+ view.show();
+
+ return app.exec();
+}