Hi

I installed Qt5 and since Phonon is not supported in Qt5 I'm forced to use something else, so I decided to use QtMultimedia.

.pro file:

Qt Code:
  1. QT += core gui
  2. CONFIG += mobility
  3. MOBILITY += multimedia
To copy to clipboard, switch view to plain text mode 

.cpp code:

Qt Code:
  1. #include "mainwindow.h"
  2. #include "ui_mainwindow.h"
  3. #include <QtGui>
  4. #include <QtCore>
  5. #include <QtMultimedia/QMediaPlayer>
  6.  
  7. ...
  8.  
  9. void MainWindow::on_pushButton_clicked()
  10. {
  11. QMediaPlayer *player = new QMediaPlayer(this);
  12. player->setVolume(50);
  13. player->setMedia(QUrl::fromLocalFile("some_path"));
  14. player->play();
  15. }
To copy to clipboard, switch view to plain text mode 

But I'm getting following errors:

df5cb69d80eadef8a7a0ce6b0ec6cc04.jpg

How can I solve this. Thank you