• 6761阅读
  • 6回复

QT  4.6 Phonon 出错 [复制链接]

上一主题 下一主题
离线yyqheaven
 
只看楼主 倒序阅读 楼主  发表于: 2009-12-19
— 本帖被 XChinux 从 General Qt Programming 移动到本区(2011-01-02) —

#include <QtGui/QApplication>
#include <Phonon/Phonon>
#include <Phonon/VideoPlayer>
#include <QUrl>
#include "widget.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    Widget w;
    w.setWindowTitle("vidoe player");
    w.resize(400,400);
    Phonon::VideoPlayer *player  = new Phonon::VideoPlayer(Phonon::VideoCategory,Widget);
    player->load(Phonon::MediaSource("../11.rm"));
    player->play();
    w.show();
    return a.exec();
}

提示:

F:/QT exercise/Phonon/main.cpp:2: error: Phonon/Phonon: No such file or directory
F:/QT exercise/Phonon/main.cpp:3: error: Phonon/VideoPlayer: No such file or directory
F:/QT exercise/Phonon/main.cpp:13: error: 'Phonon' has not been declared
F:/QT exercise/Phonon/main.cpp:13: error: 'player' was not declared in this scope
F:/QT exercise/Phonon/main.cpp:13: error: expected type-specifier before 'Phonon'
F:/QT exercise/Phonon/main.cpp:13: error: expected ';' before 'Phonon'
F:/QT exercise/Phonon/main.cpp:14: error: 'Phonon' has not been declared


离线benbenmajia

只看该作者 1楼 发表于: 2009-12-21
报错很明显,按照提示修改
安然.....
离线yyqheaven
只看该作者 2楼 发表于: 2009-12-21
修改好了
离线benbenmajia

只看该作者 3楼 发表于: 2009-12-22
~~~
安然.....
离线long2015

只看该作者 4楼 发表于: 2010-01-11
Re:QT  4.6 Phonon 出错
引用第2楼yyqheaven于2009-12-21 19:24发表的  :
修改好了

怎么改,倒是说说呀。
离线午小夜

只看该作者 5楼 发表于: 2010-01-12
donot forget about QT+=phonon
[操作系统版本]  Windows XP;Linux Ubuntu;Linux Fedora;
[Qt SDK版本]    4.7.0
[SDK 发布日期]  2010.05
[IDE(集成开发环境)] QtCreator
个人网页:http://hi.baidu.com/午小夜
學歷:Royal Jalidon
离线benbenmajia

只看该作者 6楼 发表于: 2010-01-12
小夜同学,你的英语语法真的是错的,fanxing同学说的是对的哦
安然.....
快速回复
限100 字节
 
上一个 下一个