#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