1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-23 15:22:09 +00:00
mpv/DOCS/client_api_examples/qml/main.cpp

20 lines
395 B
C++
Raw Normal View History

#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();
}