Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. how to import qml in js?

how to import qml in js?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 784 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Taz742T Offline
    Taz742T Offline
    Taz742
    wrote on last edited by
    #1

    I want to capture images in new thread, which is described in js file.
    how can I make it?????

    Do what you want.

    E 1 Reply Last reply
    0
    • Taz742T Taz742

      I want to capture images in new thread, which is described in js file.
      how can I make it?????

      E Offline
      E Offline
      Eeli K
      wrote on last edited by
      #2

      @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?

      Taz742T 1 Reply Last reply
      0
      • E Eeli K

        @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?

        Taz742T Offline
        Taz742T Offline
        Taz742
        wrote on last edited by Taz742
        #3

        @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

        Do what you want.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved