[Development] videoPlayer crashed

Brian Li lxgbrian at gmail.com
Sat Feb 18 06:30:31 CET 2012

Dear all:
I'm learning to use the Phonon in QT, followed up some examples in the help
document to setup one VideoPlayer, but when running this programe, it always
crashed, the example is so simple I don't known where is wrong.
#include <QtCore>
#include <QtGui>
#include <phonon>

int main(int argc, char *argv[]) {
    QApplication app(argc, argv);
    QWidget *widget = new QWidget;
    widget->setWindowTitle("Video Player");

    QString fileName = QFileDialog::getOpenFileName(0,
     ("Open videos"), "e:\\usr", ("All Files (*.*)")); 
    Phonon::VideoPlayer *player = new
Phonon::VideoPlayer(Phonon::VideoCategory, widget); 
    return app.exec();

Anyone can give me a hand? The example is runned under Windows XP.

发件人: development-bounces+lxgbrian=gmail.com at qt-project.org
[mailto:development-bounces+lxgbrian=gmail.com at qt-project.org] 代表
lars.knoll at nokia.com
发送时间: 2012年2月18日 5:53
收件人: anselmo.melo at openbossa.org; development at qt-project.org
主题: Re: [Development] Request for playground project: UI Helpers

Sounds good to me. Sergio or Rohan, can you help, please?


On 2/17/12 7:04 PM, "ext Anselmo L. S. Melo" <anselmo.melo at openbossa.org>

>I would like to continue the work started with the change 15857 [1], when
>we discussed about moving QUndo* out of QtWidgets.
>In this change, first we moved these classes to QtGui, then to a new lib
>inside qtbase. However, it was not considered ideal and the
>decision was to create a separated repo for these classes, leaving
>QtWidgets untouched.
>UI Helpers - short description:
>"The UI Helpers repository will contain non-widget based ui classes that
>are useful for those who intend to develop applications
>using Qt5/QtQuick 2 but do not want to depend on QtWidgets - mainly
>desktop applications. Examples of classes are QUndoCommand,
>QAction, QFileSystemModel, etc."
>[1] http://codereview.qt-project.org/#change,15857
>Anselmo L. S. Melo
>openBossa / INdT
>Development mailing list
>Development at qt-project.org

Development mailing list
Development at qt-project.org

More information about the Development mailing list