Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Unsolved App crashed when instantiate a QMediaPlayer object in android with qt5.9.2

    Mobile and Embedded
    3
    3
    513
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      cirno_sama last edited by cirno_sama

      APP crashed when I add "QT+=multimedia" in .pro file,"#include <QMediaPlayer>" in .h file,and "QMediaPlayer *player=new QMediaPlayer(this);" in cpp file.
      Can anyone help me?

      M 1 Reply Last reply Reply Quote 0
      • M
        mvuori @cirno_sama last edited by

        I notice that Qt's documentation for QMediaPlayer construct it without any arguments - perhaps it has problems with whatever you set as its parent. So, I'd try just: player = new QMediaPlayer;

        1 Reply Last reply Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi,

          You should also consider updating to the latest version of the 5.9 series if not Qt 5.10.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply Reply Quote 0
          • First post
            Last post