blob: ae70733fc9c76362f9740933b5e2cb94fa7f65c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
pragma Strict
import QtQml
QtObject {
id: mainRow
property int calledFoo: 0
property int calledBar: 0
function foo(column: int) : void { ++calledFoo }
function bar(column: int) : void { ++calledBar }
property int a: 0
property int b: 0
signal event(key: int)
onEvent: key => {
let forwardArrowKey = (key === Qt.Key_Right && !mainRow.objectName.length)
if (2 > a)
mainRow.foo(mainRow.b)
if (forwardArrowKey)
mainRow.bar(mainRow.b)
}
}
|