Changeset View
Changeset View
Standalone View
Standalone View
windowswitchers/small_icons/contents/ui/main.qml
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | 38 | mainItem: Item { | |||
---|---|---|---|---|---|
86 | * @li we have to emit the change signal | 86 | * @li we have to emit the change signal | ||
87 | * @li on multiple invocation it does not work on the list view. Focus seems to be lost. | 87 | * @li on multiple invocation it does not work on the list view. Focus seems to be lost. | ||
88 | **/ | 88 | **/ | ||
89 | Keys.onPressed: { | 89 | Keys.onPressed: { | ||
90 | if (event.key == Qt.Key_Left) { | 90 | if (event.key == Qt.Key_Left) { | ||
91 | icons.decrementCurrentIndex(); | 91 | icons.decrementCurrentIndex(); | ||
92 | } else if (event.key == Qt.Key_Right) { | 92 | } else if (event.key == Qt.Key_Right) { | ||
93 | icons.incrementCurrentIndex(); | 93 | icons.incrementCurrentIndex(); | ||
94 | } else if (event.key == Qt.Key_F4 || event.key == Qt.Key_W) { | ||||
95 | model.close(currentIndex) | ||||
94 | } | 96 | } | ||
95 | } | 97 | } | ||
96 | } | 98 | } | ||
97 | } | 99 | } | ||
98 | } | 100 | } |