graciano
25th March 2010, 23:06
Hi,
This is my first try with Phonon ... so be patient :o
I wrote this code:
#include <QApplication>
#include <QBoxLayout>
#include <QWidget>
#include <QUrl>
#include <Phonon>
int main(int argc, char *argv[]){
QApplication app(argc, argv);
app.setApplicationName("myApp");
QWidget *window = new QWidget;
QWidget *video = new QWidget;
Phonon::VideoPlayer *myPlayer= new Phonon::VideoPlayer(Phonon::VideoCategory, video);
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(myPlayer);
window->setLayout(layout);
QUrl url("http://www.youtube.com/watch?v=p916yeFa2Xk");
myPlayer->play(url);
window->show();
return app.exec();
}
What's missing so that i can watch this beautiful video?
Thanks
This is my first try with Phonon ... so be patient :o
I wrote this code:
#include <QApplication>
#include <QBoxLayout>
#include <QWidget>
#include <QUrl>
#include <Phonon>
int main(int argc, char *argv[]){
QApplication app(argc, argv);
app.setApplicationName("myApp");
QWidget *window = new QWidget;
QWidget *video = new QWidget;
Phonon::VideoPlayer *myPlayer= new Phonon::VideoPlayer(Phonon::VideoCategory, video);
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(myPlayer);
window->setLayout(layout);
QUrl url("http://www.youtube.com/watch?v=p916yeFa2Xk");
myPlayer->play(url);
window->show();
return app.exec();
}
What's missing so that i can watch this beautiful video?
Thanks