#include "favoritedialog.h"
#include "ui_favoritedialog.h"

//#include <QMediaPlayer>
//#include <QMediaPlaylist>

FavoriteDialog::FavoriteDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::FavoriteDialog)
{
    ui->setupUi(this);
}

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

void FavoriteDialog::on_cBox_playMusic_clicked(bool checked)
{
//    QMediaPlayer *Music;//初始化音乐
//    QMediaPlaylist *PlayList;//初始化播放列表
//    Music = new QMediaPlayer(this);//QMediaplayer用于解析音频文件和视频文件
//    PlayList = new QMediaPlaylist(this);
//    PlayList->addMedia(QUrl::fromLocalFile(":/audio/audio.mp3"));//将音乐文件逐一加入到播放列表
//    PlayList->setPlaybackMode(QMediaPlaylist::CurrentItemInLoop);
//    Music->setPlaylist(PlayList);
//    Music->setVolume(0);
//    Music->play();
//    Music->stop();
}
