Fix bug with app crash on exit. Add keyboard support in wordList, DictTypeSelectDialo...
[mdictionary] / src / mdictionary / qml / DictTypeSelectDialog.qml
index ac20bfe..288b1a9 100644 (file)
@@ -27,12 +27,21 @@ import Qt 4.7
 Rectangle {
     SystemPalette { id: myPalette; colorGroup: SystemPalette.Active }
     signal selectedRow(int nr)
+    function setFocus() {
+        dictTypeList.setFocus()
+    }
 
     id: rectangle1
     color: myPalette.base
     anchors.fill: parent
 
     ElementsListView{
+        Keys.onPressed: {
+            if ((event.key == Qt.Key_Return || event.key == Qt.Key_Enter) && currentIndex >= 0){
+                selectedRow(currentIndex)
+            }
+        }
+
         id: dictTypeList
         width: rectangle1.width
         height: rectangle1.height