summaryrefslogtreecommitdiffstats
path: root/DOCS/client_api_examples/qtexample.h
diff options
context:
space:
mode:
Diffstat (limited to 'DOCS/client_api_examples/qtexample.h')
-rw-r--r--DOCS/client_api_examples/qtexample.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/DOCS/client_api_examples/qtexample.h b/DOCS/client_api_examples/qtexample.h
new file mode 100644
index 0000000000..b5b6fe7fb2
--- /dev/null
+++ b/DOCS/client_api_examples/qtexample.h
@@ -0,0 +1,30 @@
+#ifndef QTEXAMPLE_H
+#define QTEXAMPLE_H
+
+#include <QMainWindow>
+
+#include <mpv/client.h>
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ explicit MainWindow(QWidget *parent = 0);
+ ~MainWindow();
+
+protected:
+ virtual bool event(QEvent *event);
+
+private slots:
+ void on_file_open();
+
+private:
+ QWidget *mpv_container;
+ mpv_handle *mpv;
+
+ void create_player();
+ void handle_mpv_event(mpv_event *event);
+};
+
+#endif // QTEXAMPLE_H