Skip to content

Commit 36d233a

Browse files
committed
ProjectPlayer: Add question text box
1 parent e3ffc6d commit 36d233a

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/ProjectPlayer.qml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ ProjectScene {
8181
if(i !== monitors.model.count)
8282
monitors.model.remove(i);
8383
}
84+
85+
onQuestionAsked: (question)=> {
86+
questionLoader.active = true;
87+
questionLoader.item.clear();
88+
questionLoader.item.question = question;
89+
}
8490
}
8591

8692
function start() {
@@ -268,4 +274,22 @@ ProjectScene {
268274
}
269275
}
270276
}
277+
278+
Loader {
279+
id: questionLoader
280+
anchors.left: contentRect.left
281+
anchors.right: contentRect.right
282+
anchors.bottom: contentRect.bottom
283+
anchors.margins: 9
284+
active: false
285+
286+
sourceComponent: Question {
287+
onClosed: {
288+
loader.answerQuestion(answer);
289+
questionLoader.active = false;
290+
}
291+
292+
Component.onCompleted: forceActiveFocus()
293+
}
294+
}
271295
}

0 commit comments

Comments
 (0)