Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Runtime error with QGraphicsScene



  • Hello, I have an error.
    My basic code are:
    @
    QMediaPlayer *m_player;
    QGraphicsScene *m_scene;
    QGraphicsVideoItem *m_item;
    ...
    ui->setupUi(this);
    m_player = new QMediaPlayer;
    m_scene = new QGraphicsScene;
    m_item = new QGraphicsVideoItem;
    ...
    ui->graphicsView->setScene(m_scene);
    m_player->setVideoOutput(m_item);
    ui->graphicsView->scene()->addItem(m_item);
    m_player->setMedia(QUrl::fromLocalFile(fileName));
    m_player->play();
    ...
    @
    And I get the error.
    !http://s29.postimg.org/h2l8a6nrb/Capture.png!
    Windows 8.1, Qt 5.2 VS2012 32-bit.
    UPD:
    Video file: http://www.youtube.com/watch?v=vIu85WQTPRc


Log in to reply