Quote Originally Posted by wysota View Post
You need to come up with an algorithm, what your code is supposed to do, how it is supposed to behave. Currently you expect to have a linear flow in your code but this is not a good approach for an event driven framework such as Qt and even more for asynchronous operations such as sound playback. A possible approach is that you schedule sound playback, return to the event loop and when you are notified that the sound finished playing, start another note. You can queue a series of sounds and just feed them to the player when required.
My problem is that my code works the way I want - except from the fact that it crashes the program...
I don't know how to "schedule" my "sound playback", but maybe it is here that I should use signals and slots?
And when you write "... start another note", is that a thread? or?
How do I "queue a series of sounds"? I don't use phonon, but maybe it is a possibility anyway...
A lot to think about.

Thanks, David