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 -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -