• 大小: 13.94MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-29
  • 语言: 其他
  • 标签: QT  音频  播放器  

资源简介

基于QT平台的音频播放器,此乃学习考试提交毕设之利器。 功能包括:托盘操作,拖拽窗口,列表点击播放,正常播放切歌,添加删除列表

资源截图

代码片段和文件信息

#include “dialog.h“
#include “ui_dialog.h“
#include 
#include 
#include 
#include 
#include 
#include 

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

    //起始坐标,大小
    this->setGeometry(00370620);

    //窗口设置
    QIcon  titleicon(“:/resource/icon.ico“);
    this->setWindowIcon(titleicon);
    this->setWindowtitle(“Koplayer“);
    this->setWindowOpacity(1);//透明度
    this->setWindowFlags(Qt::framelessWindowHint| Qt::WindowStaysOnTopHint);//无外框显示
    this->setAttribute(Qt::WA_TranslucentBackgroundtrue);//窗口隐藏UI背景

    //正在播放true,未播放false
    flag=false;

    //填充按钮
    ui->pushButton->setstyleSheet(“QPushButton{border-image: url(:/resource/close.png)}QPushButton:hover{border-image: url(:/resource/close_hover.png)}QPushButton:pressed{border-image: url(:/resource/close_press.png)}“);
    ui->pushButton->setToolTip(tr(“关闭“));
    ui->pushButton_2->setstyleSheet(“QPushButton{border-image: url(:/resource/minimize.png)}QPushButton:hover{border-image: url(:/resource/minimize_hover.png)}QPushButton:pressed{border-image: url(:/resource/minimize_press.png)}“);
    ui->pushButton_2->setToolTip(tr(“最小化“));
    ui->pushButton_3->setstyleSheet(“QPushButton{border-image: url(:/resource/play.png)}QPushButton:hover{border-image: url(:/resource/play_hover.png)}QPushButton:pressed{border-image: url(:/resource/play_press.png)}“);
    ui->pushButton_3->setToolTip(tr(“播放“));
    ui->pushButton_4->setstyleSheet(“QPushButton{border-image: url(:/resource/stop.png)}QPushButton:hover{border-image: url(:/resource/stop_hover.png)}QPushButton:pressed{border-image: url(:/resource/stop_press.png)}“);
    ui->pushButton_4->setToolTip(tr(“停止“));
    ui->pushButton_5->setstyleSheet(“QPushButton{border-image: url(:/resource/previous.png)}QPushButton:hover{border-image: url(:/resource/previous_hover.png)}QPushButton:pressed{border-image: url(:/resource/previous_press.png)}“);
    ui->pushButton_5->setToolTip(tr(“前一个“));
    ui->pushButton_6->setstyleSheet(“QPushButton{border-image: url(:/resource/posterior.png)}QPushButton:hover{border-image: url(:/resource/posterior_hover.png)}QPushButton:pressed{border-image: url(:/resource/posterior_press.png)}“);
    ui->pushButton_6->setToolTip(tr(“后一个“));
    ui->pushButton_7->setstyleSheet(“QPushButton{border-image: url(:/resource/add.png)}QPushButton:hover{border-image: url(:/resource/add_hover.png)}QPushButton:pressed{border-image: url(:/resource/add_press.png)}“);
    ui->pushButton_7->setToolTip(tr(“添加“));
    ui->pushButton_8->setstyleSheet(“QPushButton{border-image: url(:/resource/reduce.png)}QPushButton:hover{border-image: url(:/resource/reduce_hover.png)}QPushButton:pressed{border-image: url(:/resource/reduce_press.png)}“);
    ui->pushButton_8->setToolTip(tr(“清空“));

    //托盘
    trayicon = new QSystemTrayIcon(titleiconthis);
    QMenu *traymenu = new QMenu();
   

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-03-22 09:35  KoPlayer\
     文件         374  2013-01-18 13:11  KoPlayer\KoPlayer.pro
     文件       18904  2013-03-22 09:35  KoPlayer\KoPlayer.pro.user
     文件        6898  2013-01-18 13:11  KoPlayer\Makefile
     文件        8001  2013-01-18 13:11  KoPlayer\Makefile.Debug
     文件        8095  2013-01-18 13:11  KoPlayer\Makefile.Release
     目录           0  2013-03-21 19:27  KoPlayer\debug\
     文件     4408260  2013-01-23 16:54  KoPlayer\debug\KoPlayer.exe
     文件      402699  2013-01-23 16:54  KoPlayer\debug\dialog.o
     文件      209677  2013-01-19 18:19  KoPlayer\debug\main.o
     文件        5212  2013-01-19 18:19  KoPlayer\debug\moc_dialog.cpp
     文件      234119  2013-01-19 18:19  KoPlayer\debug\moc_dialog.o
     文件          13  2013-03-21 19:27  KoPlayer\debug\musicfile
     文件    16833511  2013-01-18 15:00  KoPlayer\debug\qrc_resource.cpp
     文件     3281718  2013-01-18 15:01  KoPlayer\debug\qrc_resource.o
     文件       13818  2013-01-20 17:53  KoPlayer\dialog.cpp
     文件        1683  2013-01-19 18:19  KoPlayer\dialog.h
     文件        5155  2013-01-19 18:00  KoPlayer\dialog.ui
     文件         555  2013-01-18 14:43  KoPlayer\main.cpp
     目录           0  2013-03-22 09:35  KoPlayer\release\
     目录           0  2013-03-09 19:33  KoPlayer\resource\
     文件       51491  2007-10-14 16:56  KoPlayer\resource\add.png
     文件       65766  2012-12-27 17:38  KoPlayer\resource\add_hover.png
     文件       49787  2012-12-27 17:38  KoPlayer\resource\add_press.png
     文件      454378  2013-01-18 12:51  KoPlayer\resource\background.png
     文件       52458  2007-10-14 13:56  KoPlayer\resource\backward.png
     文件       78811  2012-12-25 15:43  KoPlayer\resource\backward_hover.png
     文件       71320  2012-12-25 15:45  KoPlayer\resource\backward_press.png
     文件       10486  2007-10-14 15:52  KoPlayer\resource\close.png
     文件       18746  2012-12-25 15:09  KoPlayer\resource\close_hover.png
     文件       21917  2012-12-25 15:35  KoPlayer\resource\close_press.png
............此处省略37个文件信息

评论

共有 条评论