QT 播放 FLASH
来源:互联网 发布:金润软件 编辑:程序博客网 时间:2024/05/16 09:21
转自:http://misterlanbing.blog.163.com/blog/static/203511084201232084414774/
/*
*main.cpp
*/
#include <QApplication>
#include <QAxWidget.h>
int main(int argc, char **argv)
{
QApplication a(argc, argv);
QTextCodec::setCodecForLocale(QTextCodec::codecForName("gb18030"));
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("gb18030"));
QTextCodec::setCodecForTr(QTextCodec::codecForName("gb18030"));
DisFlash Display;
Display.show();
return a.exec();
}
/*
*QAxWidget.h
*/
#include <QtGui>
#include <QAxWidget>
#include <QMainWindow>
class DisFlash : public QMainWindow
{
Q_OBJECT
public:
DisFlash(void);
// ~DisFlash();
private slots:
void Openfile(void);
void Flashaction(QString command,QString args);
private:
QString filepath;
QAxWidget *Flash;
QMenu *Operation;
QAction *open;
QAction *exit;
};
/*
*QAxWidget.cpp
*/
#include <QtGui>
#include <QAxWidget>
#include "QAxWidget.h"
DisFlash :: DisFlash(void)
{
resize(600,400);
Flash = new QAxWidget(this);
Flash->setControl(QString::fromUtf8("{d27cdb6e-ae6d-11cf-96b8-444553540000}"));
setCentralWidget(Flash);
connect(Flash,SIGNAL(FSCommand(QString,QString)),this,SLOT(Flashaction(QString,QString)));
open = new QAction(tr("打开"),this);
connect(open,SIGNAL(triggered()),this,SLOT(Openfile()));
exit = new QAction(tr("退出"),this);
connect(exit,SIGNAL(triggered()),this,SLOT(close()));
Operation = menuBar() -> addMenu(tr("File"));
Operation -> addAction(open);
Operation -> addAction(exit);
filepath = "./"; //初始路径为当前目录
}
void DisFlash :: Openfile(void)
{
filepath = QFileDialog :: getOpenFileName(this,tr("Open File"),filepath,"*.swf");
Flash->dynamicCall("LoadMovie(long,string)",0,filepath);
}
void DisFlash :: Flashaction(QString command,QString args)
{
}
在 pro 文件中添加 CONFIG+=qaxcontainer
(转者注:即添加上QAxContainerd.lib)
播放界面
- Qt实现播放Flash
- qt 播放flash
- Qt实现播放Flash
- QT 播放 FLASH
- Qt Flash 播放
- Qt for Windows播放Flash
- Qt 程序里播放 flash
- Qt 程序里播放 flash
- [转] qt播放flash
- [转] qt播放flash
- Qt使用QAxWidget播放FLASH
- QT中播放FLASH的问题
- QT 播放flash出现空白间距问题的解决
- Qt 程序里播放 flash(控件定时关闭)
- Flash播放
- 播放Flash
- 从内存播放Flash。
- (转)flash播放器
- Object - C Block 运用1
- 应聘者自我介绍
- SDJZUOJ 2351 Think Different
- c++工资管理系统
- thingk different
- QT 播放 FLASH
- hdu2952——Counting Sheep(DFS&&BFS)
- Object - C Block 运用2
- 错误:The processing instruction target matching "[xX][mM][lL]" is not allowed.
- C++数据结构与STL--栈的应用--中缀表达式转后缀表达式
- WIN32汇编显示一个窗口
- extern "C"的用法解析
- ASP.net-验证控件
- android基础篇------------java基础(9)(集合的综合练习)