Unsolved how to import qml in js?
-
I want to capture images in new thread, which is described in js file.
how can I make it????? -
@Taz742 First, have you read http://doc.qt.io/qt-5/threads-technologies.html and especially WorkerScript? Second, it's a bit difficult to tell how the thread subject line and your question are related. Can you elaborate?
-
@Eeli-K
yes I know, this is my code://main.qml
MouseArea
{
anchors.fill: parent
onClicked:
myWorker.sendMessage("Capture Image")
}
WorkerScript
{
id: myWorker
source: "qrc:/images/threader.js"
onMessage:console.log("Captured")
}//threader.js
WorkerScript.onMessage=function(message)
{
WorkerScript.sendMessage({'reply': camera.ImageCapture.Capture()})
}but camera does not work in js