Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hello,
I am trying to play a sound in a non-qt thread:
QSound::play(":/button20.wav");
I receive this error: QObject: Cannot create children for a parent that is in a different thread.
Any ideas ?
Thanks,
Alex
Can you create an instance and play that?
#include <QSound> ... QSound button20Sound(":/button20.wav"); button20Sound.play();
Thank you for your answer. With your method, the error is not there anymore.
However, I don't hear the sound. I hear it when I play the file outside the thread (in the main).