diff options
Diffstat (limited to 'src/qml/doc/snippets/qml/integrating-javascript/connectjs.qml')
-rw-r--r-- | src/qml/doc/snippets/qml/integrating-javascript/connectjs.qml | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/qml/doc/snippets/qml/integrating-javascript/connectjs.qml b/src/qml/doc/snippets/qml/integrating-javascript/connectjs.qml index 715e832d48..3f50c67aba 100644 --- a/src/qml/doc/snippets/qml/integrating-javascript/connectjs.qml +++ b/src/qml/doc/snippets/qml/integrating-javascript/connectjs.qml @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are @@ -38,20 +48,19 @@ ** ****************************************************************************/ //![0] -import QtQuick 2.0 +import QtQuick 2.12 import "script.js" as MyScript Item { id: item width: 200; height: 200 - MouseArea { - id: mouseArea - anchors.fill: parent + TapHandler { + id: inputHandler } Component.onCompleted: { - mouseArea.clicked.connect(MyScript.jsFunction) + inputHandler.tapped.connect(MyScript.jsFunction) } } //![0] |