Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. App crashed when instantiate a QMediaPlayer object in android with qt5.9.2

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

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 3 Posters 657 Views
  • 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 Offline
    C Offline
    cirno_sama
    wrote on last edited by cirno_sama
    #1

    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
    0
    • C 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 Offline
      M Offline
      mvuori
      wrote on last edited by
      #2

      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
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        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
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved