aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/threading
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/threading')
-rw-r--r--examples/quick/threading/threadedlistmodel/timedisplay.qml5
-rw-r--r--examples/quick/threading/workerscript/Spinner.qml1
-rw-r--r--examples/quick/threading/workerscript/workerscript.qml2
3 files changed, 6 insertions, 2 deletions
diff --git a/examples/quick/threading/threadedlistmodel/timedisplay.qml b/examples/quick/threading/threadedlistmodel/timedisplay.qml
index 5ad901c676..c4e6e7b249 100644
--- a/examples/quick/threading/threadedlistmodel/timedisplay.qml
+++ b/examples/quick/threading/threadedlistmodel/timedisplay.qml
@@ -59,7 +59,10 @@ Rectangle {
anchors.fill: parent
model: listModel
delegate: Component {
- Text { text: time }
+ Text {
+ required property string time
+ text: time
+ }
}
ListModel { id: listModel }
diff --git a/examples/quick/threading/workerscript/Spinner.qml b/examples/quick/threading/workerscript/Spinner.qml
index 9c70090dba..a2257f8639 100644
--- a/examples/quick/threading/workerscript/Spinner.qml
+++ b/examples/quick/threading/workerscript/Spinner.qml
@@ -78,6 +78,7 @@ Rectangle {
clip: true
model: 64
delegate: Text {
+ required property int index
font.pixelSize: 18;
color: "white";
text: index;
diff --git a/examples/quick/threading/workerscript/workerscript.qml b/examples/quick/threading/workerscript/workerscript.qml
index 735cc8d1f1..eb8ad43d01 100644
--- a/examples/quick/threading/workerscript/workerscript.qml
+++ b/examples/quick/threading/workerscript/workerscript.qml
@@ -58,7 +58,7 @@ Rectangle {
id: myWorker
source: "workerscript.mjs"
- onMessage: {
+ onMessage: (messageObject) => {
if (messageObject.row == rowSpinner.value && messageObject.column == columnSpinner.value){ //Not an old result
if (messageObject.result == -1)
resultText.text = "Column must be <= Row";