#include "mainwindow.h"
#include "ui_mainwindow.h"

#include <QUrl>
#include <QMediaPlayer>
#include <QVideoWidget>

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    QMediaPlayer* player = new QMediaPlayer;
    QVideoWidget* videoWidget = new QVideoWidget;
    player->setVideoOutput(videoWidget);
    player->setMedia(QUrl::fromLocalFile("/mnt/hgfs/share/source/Qt_Linux_Video_Player_Test/Qt_Linux_Video_Player_Test/videoList/test.mp4"));
    videoWidget->show();
    player->play();
    this->setCentralWidget(videoWidget);
}

MainWindow::~MainWindow()
{
    delete ui;
}
