Hi to all,
In my application I play a sound file when a particular situation occours ( a user is recognized with a biometric system ).
The code is basically executed in a timer event so:

Qt Code:
  1. void MyClass::onTimer()
  2. {
  3. timer->stop();
  4. //..code..
  5. currentFrame = GetCameraFrame();
  6. if( userIsRecognized(frame) )
  7. {
  8. emit sig_userRecognized();
  9. }
  10. turnOffTheCamera();
  11. //.. more code..
  12. timer->start(5);
  13. }
To copy to clipboard, switch view to plain text mode 
in the slot connected to the sig_userRecognized() signal basically I do something and I play a file using phonon so:

Qt Code:
  1. void MyClass::onUserRecognized()
  2. {
  3. //some code
  4. mediaObject->setCurrentSource( Phonon::MediaSource("./sounds/file.wav") );
  5. mediaObject->play();
  6. //more code
  7. }
To copy to clipboard, switch view to plain text mode 
What I would do is pause the onTimer routine 'till the file has finished to play but I don't know how because seems that's played in a separated thread.
Regards