diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2021-02-12 08:53:00 +0100 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-02-12 10:30:20 +0000 |
| commit | 4cc91a6a0e4f9063233a4d6554ae64855cf99c14 (patch) | |
| tree | 89175c0d09b16926a95c3b1239f73971beacf5bb /src/quick/doc/snippets/qml/springanimation.qml | |
| parent | eaa9993682f02ef0420ec49b816da27db3ca00c2 (diff) | |
Use functions as signal handlers when accessing parameters
Injected signal handlers are bad practice because they aren't declared.
Pick-to: 6.1
Task-number: QTBUG-89943
Change-Id: I3a691f68342a199bd63034637aa7ed438e3a037b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/quick/doc/snippets/qml/springanimation.qml')
| -rw-r--r-- | src/quick/doc/snippets/qml/springanimation.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/doc/snippets/qml/springanimation.qml b/src/quick/doc/snippets/qml/springanimation.qml index 658bcfb7d7..c18d662abc 100644 --- a/src/quick/doc/snippets/qml/springanimation.qml +++ b/src/quick/doc/snippets/qml/springanimation.qml @@ -65,7 +65,7 @@ Item { MouseArea { anchors.fill: parent - onClicked: { + onClicked: (mouse)=> { rect.x = mouse.x - rect.width/2 rect.y = mouse.y - rect.height/2 } |
