Qt 6.11 is out! See what's new in the release
blog
QEffectSound with Qt6.3
-
Hello I have a problem with QEffectSound on Qt 6
My code here :QSoundEffect sound; sound.setSource(QUrl::fromLocalFile("fi.wav")); sound.setLoopCount(1); sound.setVolume(75.0f); sound.play();@Alfredy said in QEffectSound with Qt6.3:
Hello I have a problem with QEffectSound on Qt 6
And now we have to guess what the problem is?
-
Please provide a minimal, compilable example of your problem. Your code above will work fine when fi.wav is in yourcurrent path and QSoundEffect lives long enough. Both can't be proven from anyone else but you.
-
@Alfredy
As @Christian-Ehrlicher says. Two obvious possibilities:- "File not found" for WAV file.
- What is the scope of
QSoundEffect sound? I believe it has to remain in existence,sound.play()only starts playing the sound, not blocks while it plays?