aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/tests/QtQml/bug_847.qml
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/tests/QtQml/bug_847.qml')
-rw-r--r--sources/pyside6/tests/QtQml/bug_847.qml37
1 files changed, 37 insertions, 0 deletions
diff --git a/sources/pyside6/tests/QtQml/bug_847.qml b/sources/pyside6/tests/QtQml/bug_847.qml
new file mode 100644
index 000000000..18efd80ce
--- /dev/null
+++ b/sources/pyside6/tests/QtQml/bug_847.qml
@@ -0,0 +1,37 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+import QtQuick 2.0
+
+Rectangle {
+ width: 500
+ height: 500
+ color: 'red'
+
+ property variant pythonObject: undefined
+
+ Text {
+ anchors.centerIn: parent
+ text: 'click me'
+ color: 'white'
+ }
+
+ onPythonObjectChanged: {
+ if (pythonObject) {
+ // Delay execution of method invocation, so that the event loop has a chance to start,
+ // which will subsequently be stopped by the method.
+ timer.start()
+ }
+ }
+
+ Timer {
+ id: timer
+ interval: 100; running: false;
+ onTriggered: {
+ if (pythonObject) {
+ pythonObject.blubb(42, 84)
+ }
+ }
+ }
+}
+