}
function setEnabled(Boolean) { wordList.enabled = Boolean }
+ function setWordListEmpty(Boolean) { wordList.empty = Boolean }
signal wordSelected(string word);
anchors.fill: parent
highlightResizeSpeed: 1000
+ property bool empty: false
delegate: Component{
id: wordListDelegate
}
+ Text {
+ id: emptyText
+ anchors.top: parent.top
+ anchors.left: parent.left
+ text: qsTr("Can't find any matching words")
+ }
+
model: wordModel
+
+ states: [
+ State {
+ name: "empty"
+ when: (wordList.empty == true);
+ PropertyChanges { target: emptyText; visible: true}
+ },
+ State {
+ name: "non-empty"
+ when: (wordList.empty == false);
+ PropertyChanges { target: emptyText; visible: false}
+ }
+ ]
}
}