see example qmusicplayer in QtSdk example folder. Or use signal and slots for changing the track. Use---> void MediaObject::finished () signal which will emit when the object has finished playback. It is not emitted if you call stop(), pause() or load(). It is emitted only when the current media source has finished playing and the media queue() is empty, or when a fatal error occurs.