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
Post a Comment