Qt get file path of current playing media?

I need to store the full path of current playing audio in QMediaPlayer in a QString Variable. I need this to get metadata using taglib library which require file path of the media.


Using: http://doc.qt.io/qt-5/qmediaplayer.html#media-prop, http://doc.qt.io/qt-5/qmediacontent.html#resources, http://doc.qt.io/qt-5/qmediaresource.html#url and http://doc.qt.io/qt-5/qurl.html#path you can use mediaPlayer->media.resources.first().url().path().

Take a look at the docs.

You can do it by calling


Need Your Help

C#, AutoMapper, HOWTO: Map List to DataTable

datatable automapper enterprise-library idatareader table-valued-parameters

Due to working with enterprise library data blocking to execute stored procedures with Table valued params (TVP).

Edit source files with custom maven archetype

java maven-2 maven-archetype

I have created a customer maven archetype and have it setup with some custom requiredProperties: