Qt5.1.1 QML ProgressBar not updated once an audio file played to end by Audio (QtMultimedia 5.0)
-
Always if the status EndOfMedia is reached and a new file is loaded, the audio player can not update the ProgressBar anymore, although the actual played samples (playMusic.position) still can be displayed correctly in a text field. The audio player application must be closed and restarted to make it work again.
What can be the problem?@
import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Controls.Styles 1.0
import QtMultimedia 5.0
import QtQuick.Dialogs 1.0FileDialog { id: fileDialog
title: "Please choose a file"
nameFilters: [ "Audio files (*.mp3 .wav)", "All files ()" ]onAccepted: { playMusic.source = fileDialog.fileUrl } onRejected: { } }
Audio {id: playMusic
}
ProgressBar { id: progress
minimumValue: 0.0
maximumValue: playMusic.duration
value: playMusic.position
}
@