Tutorial by Examples

Let's create very simple video player using QtMultimedia module of Qt 5. In .pro file of your application you will need the following lines: QT += multimedia multimediawidgets Note that multimediawidgets is necessary for usage of QVideoWidget. #include <QtMultimedia/QMediaPlayer> #inclu...
As this is an audio, we don't need a QVideoWidget. So we can do: _player = new QMediaPlayer(this); QUrl file = QUrl::fromLocalFile(QFileDialog::getOpenFileName(this, tr("Open Music"), "", tr(""))); if (file.url() == "") return ; _player->setMedia(f...

Page 1 of 1