qt - undefined reference to `QSound::play(QString const&)' -


trying play sound, via qsound (qt 5, ubuntu 13.04)

the code:

#include <qtmultimedia/qsound> void mainwindow::on_pushbutton_2_clicked() { qsound::play("sounds/win.wav"); } 

and getting 2 errors: undefined reference `qsound::play(qstring const&)' collect2: error: ld returned 1 exit status

what doing wrong ? in documentation here see same code.

you need include multimedia module. add .pro file:

qt += multimedia 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -