Qt文件管理器,树莓派文件管理器

在这里插入图片描述
实现方式:QFileSystemModel

#pragma execution_character_set("utf-8")

#ifndef MAINWIDGET_H
#define MAINWIDGET_H

#include <QStringList>
#include <QFileSystemModel>
#include <QWidget>
#include <QPushButton>
#include <QTableView>
#include <QLineEdit>
#include <QLabel>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QSplitter>
#include <QDebug>
#include <QMessageBox>
#include <QProcess>
#include <QAction>
#include <QMenu>
#include "qcitemdelegate.h"
#include <QContextMenuEvent>
#include "play/player.h"
#include <QStandardItemModel>
#include <QAbstractItemModel>
#include "qcfilesystemmodel.h"
#include "buttondelegate.h"

class MainWidget : public QWidget
{
    Q_OBJECT

public:
    explicit MainWidget(QWidget *parent = 0);
    ~MainWidget();
protected:
    virtual void keyPressEvent(QKeyEvent *event);
    virtual void resizeEvent(QResizeEvent *event);
    void initSystem(void);
    void initForm();
    void contextMenuEvent(QContextMenuEvent *event);
    bool removeFolderContent(const QString &folderDir);
    bool findSameFile(QString filename,QString folderDir);//查找同名文件
    bool copyDirectoryFiles(const QString &fromDir, const QString &toDir);
private slots:
    void showPlayW();
    void showPath(const QModelIndex &index);
    void getPath(const QModelIndex &index);
    void newTxtFile(void);
    void newExelFile(void);
    void newWordFile(void);
    void deleteFile(void);
    void newDFile(void);
    void copyFile(void);
    void pastFile(void);
    void GoBack(void);
    void GoAhead(void);
    void updataModel(void);
    void resizeSet();



private:
    int selectRow;
    QCFileSystemModel *model;
    QModelIndex DirIndex;
    QModelIndex selectFileIndex;
    QList<QModelIndex>PathIdex; //上下级
    int IdexAt;//dex位置记录
    QModelIndex copyIdex;
    bool isCopy;
    QString copyPath;
    QString copyFileName;
    QString copyPostfixName;
    QString newPath;
    bool isCopyFile;
    bool isDelete;

private:
    QCItemDelegate *m_QCItemDelegate;
    QPushButton *btn_del;
    QPushButton *btn_down;
    QPushButton *btn_up;
    QPushButton *btn_paste;
    QPushButton *btn_update;
    QPushButton *btn_copy;
    QTableView  *tableView;
    QLineEdit *lineEdit;
    QLabel *label;
    QHBoxLayout *hlayoutA;
    QHBoxLayout *hlayoutB;
    QHBoxLayout *hlayoutC;
    QHBoxLayout *hlayoutD;
    QVBoxLayout *vlayout;
    QStringList strPathList;


};

#endif // MAINWIDGET_H

#pragma execution_character_set("utf-8")

#include "mainwidget.h"
#include <QHeaderView>
#include "playwidget.h"

MainWidget::MainWidget(QWidget *parent) :
    QWidget(parent)
{
    setWindowTitle(QString::fromLocal8Bit("Qt文件管理器"));
    resize(600,400);
    selectRow = -1;
    initForm();
    initSystem();
}

MainWidget::~MainWidget()
{

}

void MainWidget::keyPressEvent(QKeyEvent *event)
{
    if(event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return)
    {
        tableView->setRootIndex(model->index(lineEdit->text()));
    }
}

void MainWidget::resizeEvent(QResizeEvent *event)
{
    resizeSet();
}

void MainWidget::initSystem()
{
    QStringList nameFilter;
    //    nameFilter << "*.avi";
    model->setNameFilterDisables(false);
    model->setNameFilters(nameFilter);
    model->setReadOnly(false);            //设置可以修改
    QStandardItemModel models(4,2);

    tableView->setModel(model);
    IdexAt = 0;
    isCopy = false;
    isDelete = false;
    model->setRootPath("");
    lineEdit->setText(tr("My computer"));
    tableView->setRootIndex(model->index(model->rootPath()));
    strPathList.append(model->rootPath());
    //tableView.add
    m_QCItemDelegate = new QCItemDelegate();
//    tableView->setItemDelegateForColumn(2,m_QCItemDelegate);
    tableView->horizontalHeader()->setStretchLastSection(true);
    QStringList headerList;
    headerList.append(QString::fromLocal8Bit("名称"));
    headerList.append(QString::fromLocal8Bit("大小"));
    headerList.append(QString::fromLocal8Bit("分辨率"));
    headerList.append(QString::fromLocal8Bit("修改日期"));
    QStandardItemModel* itemModel = new QStandardItemModel();
    itemModel->setHorizontalHeaderLabels(headerList);
    tableView->horizontalHeader()->setModel(itemModel);


}

void MainWidget::initForm()
{
    btn_del = new QPushButton(this);
    btn_down = new QPushButton(this);
    btn_up = new QPushButton(this);
    btn_paste = new QPushButton(this);
    btn_update = new QPushButton(this);
    btn_copy = new QPushButton(this);
    tableView = new QTableView(this);
    model = new QCFileSystemModel;
    lineEdit = new QLineEdit(this);

    label = new QLabel(this);
    btn_del->setText(QString::fromLocal8Bit("删除"));
    btn_down->setText(QString::fromLocal8Bit("下一级"));
    btn_up->setText(QString::fromLocal8Bit("上一级"));
    btn_paste->setText(QString::fromLocal8Bit("粘贴"));
    btn_update->setText(QString::fromLocal8Bit("刷新"));
    btn_copy->setText(QString::fromLocal8Bit("复制"));
    label->setText("path:");

    hlayoutA = new QHBoxLayout;
    hlayoutB = new QHBoxLayout;
    hlayoutC = new QHBoxLayout;
    hlayoutD = new QHBoxLayout;

    hlayoutC->addWidget(tableView);

    vlayout = new QVBoxLayout;
    hlayoutA->addWidget(label);
    hlayoutA->addWidget(lineEdit);

    hlayoutB->addWidget(btn_up);
    hlayoutB->addWidget(btn_down);
    hlayoutB->addWidget(btn_del);
    hlayoutB->addWidget(btn_update);
    hlayoutB->addWidget(btn_copy);
    hlayoutB->addWidget(btn_paste);
    vlayout->addLayout(hlayoutA);
    //    vlayout->addLayout(hlayoutD);
    vlayout->addLayout(hlayoutC);

    vlayout->addLayout(hlayoutB);
    setLayout(vlayout);

    connect(tableView, SIGNAL(doubleClicked(QModelIndex )), this,SLOT(showPath(QModelIndex)));
    connect(btn_up,SIGNAL(clicked()),this,SLOT(GoBack()));
    connect(btn_down,SIGNAL(clicked()),this,SLOT(GoAhead()));
    connect(tableView,SIGNAL(clicked(QModelIndex)),this,SLOT(getPath(QModelIndex)));
    connect(btn_copy,SIGNAL(clicked()),this,SLOT(copyFile()));
    connect(btn_paste,SIGNAL(clicked()),this,SLOT(pastFile()));
    connect(btn_del,SIGNAL(clicked()),this,SLOT(deleteFile()));
    connect(btn_update,SIGNAL(clicked()),this,SLOT(updataModel()));


    resizeSet();

}
//新建文本文档
void MainWidget::newTxtFile(void)
{
    resizeSet();
    QString path = model->fileInfo(DirIndex).absoluteFilePath();//获取程序当前文件路径
#ifdef _WIN32
    path.replace("/","\\");//将路径中的'/'替换为windows中的'\\'
    path = path + "\\";
#else
    path = path + "/";//LINUX路径
#endif
    if(!findSameFile(tr("NewNotepad.txt"),path))
    {
        QFile file(path+tr("NewNotepad.txt"));
        file.open(QIODevice::WriteOnly);
        file.close();
    }
    else
    {
        int i = 1;
        QString num;
        while(1)
        {
            QString filename = tr("NewNotepad")+num.setNum(i)+".txt";
            if(!findSameFile(filename,path))
            {
                QFile file(path+filename);
                file.open(QIODevice::WriteOnly);
                file.close();
                return;
            }
            i++;
        }
    }
}
//新建excel表格
void MainWidget::newExelFile(void)
{
    resizeSet();
    QString path = model->fileInfo(DirIndex).absoluteFilePath();//获取程序当前文件路径
#ifdef _WIN32
    path.replace("/","\\");//将路径中的'/'替换为windows中的'\\'
    path = path + "\\";
#else
    path = path + "/";
#endif
    if(!findSameFile(tr("Microsoft Excel.xls"),path))
    {
        QFile file(path+tr("Microsoft Excel.xls"));
        file.open(QIODevice::WriteOnly);
        file.close();
    }
    else
    {
        int i = 1;
        QString num;
        while(1)
        {
            QString filename = tr("Microsoft Excel")+num.setNum(i)+".xls";
            if(!findSameFile(filename,path))
            {
                QFile file(path+filename);
                file.open(QIODevice::WriteOnly);
                file.close();
                return;
            }
            i++;
        }
    }
}
//新建word文件
void MainWidget::newWordFile(void)
{
    resizeSet();
    QString path = model->fileInfo(DirIndex).absoluteFilePath();//获取程序当前文件路径
#ifdef _WIN32
    path.replace("/","\\");//将路径中的'/'替换为windows中的'\\'
    path = path + "\\";
#else
    path = path + "/";
#endif
    if(!findSameFile(tr("Microsoft Word.doc"),path))
    {
        QFile file(path+tr("Microsoft Word.doc"));
        file.open(QIODevice::WriteOnly);
        file.close();
    }
    else
    {
        int i = 1;
        QString num;
        while(1)
        {
            QString filename = tr("Microsoft Word")+num.setNum(i)+".doc";
            if(!findSameFile(filename,path))
            {
                QFile file(path+filename);
                file.open(QIODevice::WriteOnly);
                file.close();
                return;
            }
            i++;
        }
    }
}
//复制文件
void MainWidget::copyFile(void)
{
    resizeSet();
    copyIdex = selectFileIndex;
    isCopy = true;
    copyPath = model->fileInfo(copyIdex).absoluteFilePath();
#ifdef _WIN32
    copyPath.replace("/","\\");
    int begin = copyPath.lastIndexOf("\\")+1;
#else
    int begin = copyPath.lastIndexOf("/")+1;
#endif

    int end = copyPath.lastIndexOf(".")-1;
    copyPostfixName = copyPath.mid(end+1);
    copyFileName = copyPath.mid(begin,end-begin+1);
    isCopyFile = false;
    if(model->fileInfo(copyIdex).isFile()){
        isCopyFile = true;
    }
    qDebug()<<"copyPath"<<copyPath;

}
//粘贴
void MainWidget::pastFile(void)
{
    resizeSet();
    newPath = lineEdit->text();
    qDebug()<<"copyPath"<<newPath;
#ifdef _WIN32
    newPath.replace("/","\\");
#endif
    QString filename = copyFileName + copyPostfixName;
    if(isCopyFile){
        if(findSameFile(filename,newPath)){//文件存在
            int i = 1;
            QString num;
            while(1){
                filename = copyFileName+tr("_Copy") + num.setNum(i)+copyPostfixName;
                if(!findSameFile(filename,newPath))
                {
                    break;
                }
                i++;
            }//while(1)
        }
#ifdef _WIN32
        newPath = newPath + "\\" + filename;
#else
        newPath = newPath + "/" + filename;
#endif
        QFile::copy(copyPath,newPath);
    }else{
#ifdef _WIN32
        int begin = copyPath.lastIndexOf("\\")+1;
#else
        int begin = copyPath.lastIndexOf("/")+1;
#endif
        QString filename = copyPath.mid(begin);
        if(findSameFile(filename,newPath)){//文件夹存在
            int i = 1;
            QString num;
            while(1){
                QString filename1 = filename+tr("_Copy") + num.setNum(i);
                if(!findSameFile(filename1,newPath))
                {
                    filename = filename1;
                    break;
                }
                i++;
            }//while(1)
        }
#ifdef _WIN32
        newPath = newPath+"\\"+filename;
#else
        newPath = newPath+"/"+filename;
#endif
        qDebug()<<"newPath"<<newPath;
        if(!copyDirectoryFiles(copyPath,newPath)){
            qDebug()<<"no!";
        }
    }
}
//新建目录
void MainWidget::newDFile()
{
    resizeSet();
    if (!DirIndex.isValid())
    {
        return;
    }

    QString path = model->fileInfo(DirIndex).absoluteFilePath();//获取程序当前文件路径
#ifdef _WIN32
    path.replace("/","\\");//将路径中的'/'替换为windows中的'\\'
    path = path + "\\";
#else
    path = path + "/";
#endif
    QString newpathname(tr("NewFolder"));
    if(findSameFile(newpathname,path)){
        int i = 1;
        QString num;
        while(1){
            QString filename1 = newpathname + num.setNum(i);
            if(!findSameFile(filename1,path))
            {
                newpathname = filename1;
                break;
            }
            i++;
        }//while(1)
    }
    if (!model->mkdir(DirIndex, newpathname).isValid())
    {
        QMessageBox::information(this, tr("Create Directory"), tr("Failed to create the directory"));
    }
}
//删除文件
void MainWidget::deleteFile()
{
    resizeSet();
    if (!selectFileIndex.isValid())
    {
        return;
    }
    bool ok1,ok;//ok2;
    if (model->fileInfo(selectFileIndex).isDir())//删除文件夹
    {
        ok1 = removeFolderContent(model->fileInfo(selectFileIndex).absoluteFilePath());
        //   ok2 = model->rmdir(selectFileIndex);
        ok = ok1;// && ok2;
    }
    else
    {
        ok = model->remove(selectFileIndex);
    }
    if (!ok)
    {
        QMessageBox::information(this, tr("Remove"), tr("Failed to remove %1").arg(model->fileName(selectFileIndex)));
    }
    isDelete = false;
    isCopy = false;
}

//显示当前路径
void MainWidget::showPath(const QModelIndex &index)
{
    DirIndex = index;
    resizeSet();
    QString path = model->fileInfo(index).absoluteFilePath();//获取程序当前文件路径
#ifdef _WIN32
    path.replace("/","\\");//将路径中的'/'替换为windows中的'\\'
#endif
    if (model->fileInfo(index).isDir())//判断是否为目录
    {
        tableView->setRootIndex(index);//进入目录
        lineEdit->setText(path);
        tableView->setRootIndex(model->index(lineEdit->text()));

        for(int i = 0;i < strPathList.size();i++){
            if(i > IdexAt){
                strPathList.removeAt(i);
                qDebug()<<"删除==";
            }
        }
        strPathList.append(lineEdit->text());
        IdexAt = strPathList.size()-1;
        qDebug()<<"IdexAt=="<<IdexAt;
    }
    else//打开文件
    {
        QString path = model->fileInfo(index).absoluteFilePath();//获取程序当前文件路径
#ifdef _WIN32
        path.replace("/","\\");//将路径中的'/'替换为windows中的'\\'
#endif
        QProcess::startDetached("explorer "+path);//调用系统程序打开文件
    }

    QStringList headerList;
    headerList.append(QString::fromLocal8Bit("名称"));
    headerList.append(QString::fromLocal8Bit("大小"));
    headerList.append(QString::fromLocal8Bit("分辨率"));
    headerList.append(QString::fromLocal8Bit("修改日期"));

    QStandardItemModel* itemModel = new QStandardItemModel();
    itemModel->setHorizontalHeaderLabels(headerList);
    tableView->horizontalHeader()->setModel(itemModel);

    //    QLabel *label = new QLabel();
    qDebug()<<"index"<<index.row();
    qDebug()<<"index"<<index.column();
    qDebug()<<"index"<<index.data();
    QModelIndex satindex;
    satindex.sibling(1,1);
    model->setData(satindex,"dd");

    m_QCItemDelegate->setSelectRow(-1);
    //     QAbstractItemModel *tmodel;
    //    tmodel = tableView->model();
    //    tmodel->setData();
}
//鼠标右键
void MainWidget::contextMenuEvent(QContextMenuEvent *event)
{
    QAction *playAction = new QAction(tr("&play"),this);
    QAction *deletAction = new QAction(tr("&Delete"),this);
    QAction *newDAction = new QAction(tr("&NewFolder"),this);
    QMenu *CreateFilemenu = new QMenu(tr("NewFile&W"),this);
    QAction *newTxtAction = new QAction(tr("NewNotepad"),this);
    QAction *newExcelAction = new QAction(tr("Microsoft Excel"),this);
    QAction *newWordAction = new QAction(tr("Microsoft Word "),this);
    QAction *copyAction = new QAction(tr("&Copy"),this);
    QAction *pastAction = new QAction(tr("Paste&V"),this);
    QMenu menu(this);

    menu.addAction(newDAction);
    menu.addAction(CreateFilemenu->menuAction());
    CreateFilemenu->addAction(newTxtAction);
    CreateFilemenu->addAction(newExcelAction);
    CreateFilemenu->addAction(newWordAction);
    menu.addAction(playAction);
    menu.addAction(deletAction);
    menu.addAction(copyAction);
    menu.addAction(pastAction);
    if(!isCopy)
        pastAction->setEnabled(false);
    else
        pastAction->setEnabled(true);
    if(isDelete){
        deletAction->setEnabled(true);
    }else{
        deletAction->setEnabled(false);
    }
    connect(playAction,SIGNAL(triggered()),this,SLOT(showPlayW()));
    connect(deletAction,SIGNAL(triggered()),this,SLOT(deleteFile()));
    connect(newDAction,SIGNAL(triggered()),this,SLOT(newDFile()));
    connect(newTxtAction,SIGNAL(triggered()),this,SLOT(newTxtFile()));
    connect(newExcelAction,SIGNAL(triggered()),this,SLOT(newExelFile()));
    connect(newWordAction,SIGNAL(triggered()),this,SLOT(newWordFile()));
    connect(copyAction,SIGNAL(triggered()),this,SLOT(copyFile()));
    connect(pastAction,SIGNAL(triggered()),this,SLOT(pastFile()));
    QPoint p = this->pos();
    menu.exec(event->pos()+p);
}
//获取选中文件路径
void MainWidget::getPath(const QModelIndex &index)
{
    qDebug()<<"index==="<<index.row();
    selectRow = index.row();
    selectFileIndex = index;//获取选中文件
    isDelete = true;
    m_QCItemDelegate->setSelectRow(index.row());
    tableView->update();
}
//删除文件夹
bool MainWidget::removeFolderContent(const QString &folderDir)
{
    QDir dir(folderDir);
    QFileInfo curFile(folderDir);
    if(curFile.isReadable()&&curFile.isWritable()){
        if(curFile.isDir()){
            QFileInfoList fileList=dir.entryInfoList();
            int cf = fileList.count();
            for (int i=2;i<fileList.count();i++){
#ifdef _WIN32
                removeFolderContent(folderDir + "\\" + fileList.at(i).fileName());
#else
                removeFolderContent(folderDir + "/" + fileList.at(i).fileName());
#endif
            }
            dir.rmdir(folderDir);
        }else{
            QFile::remove(folderDir);
        }
    }else{
        return false;
    }
    return true;
}
//后退
void MainWidget::GoBack(void)
{
    IdexAt--;
    if(IdexAt <=0){
        IdexAt = 0;
    }
    qDebug()<<"IdexAt=="<<IdexAt;
    if(IdexAt == 0){
        lineEdit->setText(tr("My computer"));
        tableView->setRootIndex(model->index(model->rootPath()));
    }else{
        QString path = strPathList.at(IdexAt);
        lineEdit->setText(path);
        isCopy = false;
        isDelete = false;
        tableView->setRootIndex(model->index(lineEdit->text()));
    }
    QStringList headerList;
    headerList.append(QString::fromLocal8Bit("名称"));
    headerList.append(QString::fromLocal8Bit("大小"));
    headerList.append(QString::fromLocal8Bit("分辨率"));
    headerList.append(QString::fromLocal8Bit("修改日期"));

    QStandardItemModel* itemModel = new QStandardItemModel();
    itemModel->setHorizontalHeaderLabels(headerList);
    tableView->horizontalHeader()->setModel(itemModel);

    /****************以下是测试*****/
    //qDebug()<<model->index(4, 1).data();
    //qDebug()<<model->insertRow(0);
    //model->setData(model->index(4, 1), "abcsssd");
    model->setItemData(model->index(4, 0), "abcsssd");
    //QLabel *b = new QLabel("tt");
    //tableView->setIndexWidget(model->index(4, 1),b);

    //    model->beginInsertRows(model->index(4, 1),1,2);
    //    model->endInsertRows();
    QModelIndex ps = model->index(model->rootPath());
    qDebug()<<model->data(ps,1);
    m_QCItemDelegate->setSelectRow(selectRow);
}
//前进
void MainWidget::GoAhead(void)
{
    IdexAt++;
    if(IdexAt > strPathList.size()-1){
        IdexAt = strPathList.size()-1;
    }
    qDebug()<<"IdexAt=="<<IdexAt;
    QString path = strPathList.at(IdexAt);
    lineEdit->setText(path);
    isCopy = false;
    isDelete = false;
    tableView->setRootIndex(model->index(lineEdit->text()));

    QStringList headerList;
    headerList.append(QString::fromLocal8Bit("名称"));
    headerList.append(QString::fromLocal8Bit("大小"));
    headerList.append(QString::fromLocal8Bit("分辨率"));
    headerList.append(QString::fromLocal8Bit("修改日期"));
    QStandardItemModel* itemModel = new QStandardItemModel();
    itemModel->setHorizontalHeaderLabels(headerList);
    tableView->horizontalHeader()->setModel(itemModel);
}

void MainWidget::updataModel()
{
    QCFileSystemModel *t_model;
    t_model = model;
    model = new QCFileSystemModel;
    QStringList nameFilter;
    //    nameFilter << "*.avi";
    model->setNameFilterDisables(false);
    model->setNameFilters(nameFilter);
    model->setReadOnly(false);            //设置可以修改
    tableView->setModel(model);
    isCopy = false;
    isDelete = false;
    model->setRootPath("");
    tableView->setRootIndex(model->index("D:/Program Files"));
    tableView->setRootIndex(model->index(lineEdit->text()));
    if(t_model!=nullptr){
        delete t_model;
    }
}

void MainWidget::resizeSet()
{
    tableView->verticalHeader()->hide();//隐藏行号方法
    tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
    tableView->setSelectionMode(QAbstractItemView::SingleSelection);
    tableView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
    tableView->horizontalHeader()->resizeSection(0,this->width()*0.25);
    tableView->horizontalHeader()->resizeSection(1,this->width()*0.25);
    tableView->horizontalHeader()->resizeSection(2,this->width()*0.24);
    tableView->horizontalHeader()->resizeSection(3,this->width()*0.24);


}

//查找相同文件
bool MainWidget::findSameFile(QString filename,QString folderDir)
{
    QDir dir(folderDir);
    QFileInfoList fileList;
    QFileInfo curFile;
    if(!dir.exists())
    {return false;}//文件不存,则返回false
    fileList=dir.entryInfoList(QDir::Dirs|QDir::Files
                               |QDir::Readable|QDir::Writable
                               |QDir::Hidden|QDir::NoDotAndDotDot
                               ,QDir::Name);
    int infoNum=fileList.size();
    for(int i=infoNum-1;i>=0;i--)
    {
        curFile = fileList[i];
        if(0 == filename.compare(curFile.fileName()))
        {
            return true;
        }
    }
    return false;
}
//文件递归复制
bool MainWidget::copyDirectoryFiles(const QString &fromDir, const QString &toDir)
{
    QDir sourceDir(fromDir);
    QDir targetDir(toDir);
    if(!targetDir.exists())
    {    // 如果目标目录不存在,则进行创建
        if(!targetDir.mkdir(targetDir.absolutePath()))
            return false;
    }

    QFileInfoList fileInfoList = sourceDir.entryInfoList();
    foreach(QFileInfo fileInfo, fileInfoList){
        if(fileInfo.fileName() == "." || fileInfo.fileName() == "..")
            continue;

        if(fileInfo.isDir()){    // 当为目录时,递归的进行copy
            if(!copyDirectoryFiles(fileInfo.filePath(),
                                   targetDir.filePath(fileInfo.fileName())))
                return false;
        }
        else{            // 当允许覆盖操作时,将旧文件进行删除操作
            if(!QFile::copy(fileInfo.filePath(),
                            targetDir.filePath(fileInfo.fileName()))){
                return false;
            }
        }
    }
    return true;
}

void MainWidget::showPlayW()
{
    QString str = model->filePath(selectFileIndex);
    qDebug()<<"aa"<<str;
    Player w;
    w.setPlayUrl(str);
    w.exec();
}

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

vqt5_qt6

你的鼓励是我们创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值