• 大小: 5KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-07
  • 语言: 其他
  • 标签:

资源简介

这个是Qt调用系统自带的QMediaPlay来实现视频的播放。希望能帮助大家!!!

资源截图

代码片段和文件信息

#include “dialog.h“
#include “ui_dialog.h“
#include
#include yer>
#include
#include
#include
#include
#include
#include

QVBoxLayout* layout_video;//布局
QMediaPlayer* player;   //播放器
QVideoWidget* widget;   //视频播放控件
//播放状态,true为播放,false为暂停
bool play_state;
//是否重新载入视频
bool if_reload=false;
Dialog::Dialog(QWidget *parent) :
    QDialog(parent)
    ui(new Ui::Dialog)
{
    ui->setupUi(this);
    ui->pushButton_play->setEnabled(false);
//    QString directory = QFileDialog::getOpenFileName(
//                    this
//                    tr(“选择文件“)
//                    “/“
//                    “(*.png);;All files(*.*)“);
//        if (!directory.isEmpty())
//       

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       3092  2019-07-17 14:34  test\dialog.cpp

     文件        377  2019-07-17 14:30  test\dialog.h

     文件       1606  2019-07-17 14:37  test\dialog.ui

     文件        175  2019-07-10 09:10  test\main.cpp

     文件        406  2019-07-17 12:54  test\test.pro

     文件      23753  2019-07-17 14:48  test\test.pro.user

     目录          0  2019-07-17 14:48  test

----------- ---------  ---------- -----  ----

                29409                    7


评论

共有 条评论

相关资源