diff options
Diffstat (limited to 'sources/pyside6/tests/QtQml/signal_arguments.qml')
-rw-r--r-- | sources/pyside6/tests/QtQml/signal_arguments.qml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sources/pyside6/tests/QtQml/signal_arguments.qml b/sources/pyside6/tests/QtQml/signal_arguments.qml new file mode 100644 index 000000000..dbc991c77 --- /dev/null +++ b/sources/pyside6/tests/QtQml/signal_arguments.qml @@ -0,0 +1,36 @@ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + + +import QtQuick 2.5 +import QtQuick.Controls 2.12 +import QtQuick.Layouts 1.2 +import test.Obj 1.0 + +Rectangle { + visible: true + required property Obj o + GridLayout { + Button { + id: button + objectName: "button" + text: "sum!" + onClicked: { + o.sum(40, 2) + } + } + Text { + id: sumResultText + } + } + Connections { + target: o + function onSumResult(sum) { + // set the value on the Qml side + sumResultText.text = sum + // set internal Python value from the already + // modified value + o.sendValue(sumResultText.text) + } + } +} |