hi
when i use :
i get this error message :
i added this text to my.pro :'QSound': No such file or directory
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets multimedia
hi
when i use :
i get this error message :
i added this text to my.pro :'QSound': No such file or directory
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets multimedia
After adding multimedia, did your run qmake again & rebuild ?
solved : I cleaned "build-Desktop_Qt_5_0_0_MSVC2010_32bit_SDK-Debug" and rebuilding my project .
But I hear no sound
Qt Code:
void MainWindow::on_pushButton_clicked() { sound.setLoops(1); sound.play(); }To copy to clipboard, switch view to plain text mode
I got my program (Qt 5.1 based) to compile with this trick.
However during runtime I got; QSoundEffect(qaudio): Error decoding source (audio file is played ok in windows player)
Your code destroys the QSound instance immediately after scheduling the sound for playing. You should either extend the scope of the QSound or use the static QSound:lay() method.
Bookmarks