Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946

How to use mp3 with qt from resource.qrc in an application for symbian device?



  • Hello Everyone,
    I'm new in QT development for mobile using c++. I'v some problems regarding playing audio. I'm using one mp3 to load with my application. This should be present within the sis file.
    @
    player = new QMediaPlayer;
    player->setMedia(QUrl::fromLocalFile(":/song/GN.mp3")); //song is in my resource.qrc
    player->setVolume(100);
    player->play();
    @
    If I will use absolute path then my audio file will reside in system and I need it on my phone.

    Anyone there to help?

    Thanx in advance for your support.

    Edit: please use @ tags around code sections; Andre

    Thanx "tucnak" for providing this information.
    Well all these days I was trying to solve that problem, but invain. I want to play GN.mp3 in my application. I want to use it inside the sis file. How can I do it?
    Pls help me.



  • Hi, ~satya@sipl!

    Welcome to Qt Developer Network.

    There is a bug in Qt Mobility bugtracker ("QTMOBILITY-904":https://bugreports.qt-project.org/browse/QTMOBILITY-904).

    Sound cannot be played from resources. The best solution will be to copy it to temporary directory.



  • Is this bug fixed on Qt 5.3? How come it hanging there for such long time...



  • symbian is no supported for Qt5. You need to use Qt4.

    see "supported platforms":http://qt-project.org/wiki/Support-for-Symbian
    for more details.

    You are out of luck if you want to stick with Symbian.


Log in to reply