Changeset View
Changeset View
Standalone View
Standalone View
lib/qml/ResultDelegate.qml
Context not available. | |||||
81 | 81 | | |||
---|---|---|---|---|---|
82 | acceptedButtons: Qt.LeftButton | 82 | acceptedButtons: Qt.LeftButton | ||
83 | hoverEnabled: true | 83 | hoverEnabled: true | ||
84 | onEntered: { | | |||
85 | listView.currentIndex = index | | |||
86 | } | | |||
87 | | ||||
88 | onPressed: { | 84 | onPressed: { | ||
89 | __pressed = true; | 85 | __pressed = true; | ||
90 | __pressX = mouse.x; | 86 | __pressX = mouse.x; | ||
Context not available. | |||||
112 | __pressY = -1; | 108 | __pressY = -1; | ||
113 | } | 109 | } | ||
114 | } | 110 | } | ||
111 | | ||||
112 | if (!listView.moved && listView.mouseMovedGlobally()) { | ||||
113 | listView.moved = true | ||||
114 | listView.currentIndex = index | ||||
115 | } | ||||
115 | } | 116 | } | ||
116 | 117 | | |||
117 | onContainsMouseChanged: { | 118 | onContainsMouseChanged: { | ||
Context not available. | |||||
119 | __pressed = false; | 120 | __pressed = false; | ||
120 | __pressX = -1; | 121 | __pressX = -1; | ||
121 | __pressY = -1; | 122 | __pressY = -1; | ||
123 | } else { | ||||
124 | if (listView.moved) { | ||||
125 | listView.currentIndex = index | ||||
126 | } else if (listView.mouseMovedGlobally()) { | ||||
127 | listView.moved = true | ||||
128 | listView.currentIndex = index | ||||
129 | } | ||||
122 | } | 130 | } | ||
123 | } | 131 | } | ||
124 | 132 | | |||
Context not available. |