• qt播放器qt mediaplayer

    在网上找了一个别人的旧版本的播放器~自己更改了一天,终于可运行了,希望分享下同共学习; 不过出了少少问题:希望有经验的一起指导下: 运行环境:qt creator +windows 1、原计划是可支持视频播放的,现在只能加载间频(mp3),一加载视频就卡死 2.、自定义的进度条不起作用,不知为什么百分比槽连接不成功 connect(wmp, SIGNAL(PositionChange(double, double)),this, SLOT(Slot_onPositionChange(double, double))); 3、我用的是QAxWidget控件,这个是不是只支持windows的呢?或者还有没其实更好的? /******************************************************************************************* 项目名:QT播放器 Qt Mediaplayer 工程师:枫儿 完成时间:2009年12月28日 技术支持:嵌入式家园 www.studyarm.cn www.mcupark.com *******************************************************************************************/ #include "playerwindow.h" #include <QPushButton> #include <QAxWidget> #include <QSlider> #include <QLayout> #include <QTimer> #include <QTimerEvent> #include <QFileDialog> #include <QDir> PlayerWindow::PlayerWindow() { //setCaption(tr("Media Player")); fileFilters = tr("Video files (*.mpg *.mpeg *.avi *.wmv)\n" //原来字符串换行也可这样用 "Audio files (*.mp3 *.wav)"); updateTimer = 0; setMouseTracking(true); this->wmp = new QAxWidget(this); wmp->setControl("{22D6F312-B0F6-11D0-94AB-0080C74C7E95}"); // wmp->setProperty("ShowControls", QVariant(false, 0)); wmp->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding); connect(wmp, SIGNAL(PlayStateChange(int, int)),this, SLOT(Slot_onPlayStateChange(int, int))); connect(wmp, SIGNAL(ReadyStateChange(ReadyStateConstants)),this, SLOT(Slot_onReadyStateChange(ReadyStateConstants))); connect(wmp, SIGNAL(PositionChange(double, double)),this, SLOT(Slot_onPositionChange(double, double))); this->openButton = new QPushButton(tr("&Open")); connect(openButton, SIGNAL(clicked()), this, SLOT(Slot_openFile())); this->playPauseButton = new QPushButton(tr("&Play")); connect(playPauseButton, SIGNAL(clicked()), wmp, SLOT(Play())); this->stopButton = new QPushButton(tr("&Stop")); connect(stopButton, SIGNAL(clicked()), wmp, SLOT(Stop())); this->seekSlider = new QSlider(Qt::Horizontal, this); seekSlider->setEnabled(false); connect(seekSlider, SIGNAL(valueChanged(int)),this, SLOT(Slot_sliderValueChanged(int))); connect(seekSlider, SIGNAL(sliderPressed()),wmp, SLOT(Pause())); QHBoxLayout *buttonLayout = new QHBoxLayout; buttonLayout->addWidget(openButton); buttonLayout->addWidget(playPauseButton); buttonLayout->addWidget(stopButton); QVBoxLayout *mainLayout = new QVBoxLayout(this); mainLayout->addWidget(wmp); mainLayout->addLayout(buttonLayout); mainLayout->addWidget(seekSlider); this->setLayout(mainLayout); }

    0
    331
    1.5MB
    2009-12-28
    31
  • QT在window下的串口通信

    QT在window下的串口通信 QT在window下的串口通信 QT在window下的串口通信 欢迎共同兴趣朋友相互交流: www.mcupark.com 634714917

    5
    143
    1.85MB
    2009-09-21
    9
  • 用MC68HC705J1A实现超声波汽车倒泊防撞报警器的设计.pdf

    用MC68HC705J1A实现超声波汽车倒泊防撞报警器的设计 用MC68HC705J1A实现超声波汽车倒泊防撞报警器的设计 用MC68HC705J1A实现超声波汽车倒泊防撞报警器的设计

    0
    23
    117KB
    2009-09-21
    4
  • 高精度超声波测量距离系统的设计原理与实现.doc

    在工程实践中,超声波由于指向性强、能量消耗缓慢且在介质中传播的距离较远,因而经常用于距离的测量。它主要应用于倒车雷达、测距仪、物位测量仪、移动机器人的研制、建筑施工工地以及一些工业现场等,例如:距离、液位、井深、管道长度、流速等场合。利用超声波检测往往比较迅速、方便,且计算简单、易于做到实时控制,在测量精度方面也能达到工业实用的要求,因此得到了广泛的应用。

    1
    170
    112KB
    2009-09-21
    13
  • QT中文帮助文档.chm

    玩了两个月Qt,学习速度好快,好大原因是由于Qt是开源的, 这是同事给我的,好多朋友都找不到中文帮助 这除了有在Qt/example中的实例,也另添加了项目实例,仲包有qmake的学习~

    4
    77
    7.18MB
    2009-09-16
    4
  • PPI_Siemens.pdf

    西门子200编程口通信: PPI通信协议~可协是英文的~ 我花了两个月破了一个中文的~编有VC程序~ 欢迎共同学习~ QQ:634714917

    4
    65
    1.37MB
    2009-08-12
    9
  • 分享达人

    成功上传6个资源即可获取
关注 私信
上传资源赚积分or赚钱