import QtQuick 2.0 import Ubuntu.MediaScanner 0.1 Item { focus: true Keys.onReturnPressed: { model.artist = "no such artist" } Text { text: "Press return" anchors.top: parent.top } Text { id: emptyText text: (model.count == 0 && model.status == SongsModel.Ready) ? "empty" : "not empty" anchors.bottom: parent.bottom } Text { text: model.status == SongsModel.Loading ? "loading" : "" anchors.bottom: emptyText.top } MediaStore { id: store } SongsModel { id: model store: store // statusChanged is the notify signal for the status property onStatusChanged: { console.log("Status changed to " + model.status + ", count = " + model.count); } } }