1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-25 04:38:01 +00:00
mpv/DOCS/client_api_examples/qtexample.h
wm4 ab5d58c3d9 DOCS/client_api_examples: qtexample: add a log window
For the purpose of demonstration.

Also make the windows larger. I'm not exactly sure how Qt determines
the default window sizes, but here they are a bit tiny, so force them
larger.
2014-10-08 13:34:06 +02:00

34 lines
504 B
C++

#ifndef QTEXAMPLE_H
#define QTEXAMPLE_H
#include <QMainWindow>
#include <mpv/client.h>
class QTextEdit;
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;
QTextEdit *log;
void create_player();
void handle_mpv_event(mpv_event *event);
};
#endif // QTEXAMPLE_H