Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to exchange data between qt and javascript?
Forum Updated to NodeBB v4.3 + New Features

How to exchange data between qt and javascript?

Scheduled Pinned Locked Moved Unsolved General and Desktop
19 Posts 2 Posters 3.5k Views 1 Watching
  • 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.
  • small_birdS small_bird

    @jsulm So I need to transmit data between qt and javascript. How to do that? Through signal and slot mechanism.

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #9

    @small_bird I have no idea as long as you do not tell us how you're using JavaScript in your C++ app!

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    small_birdS 2 Replies Last reply
    0
    • jsulmJ jsulm

      @small_bird I have no idea as long as you do not tell us how you're using JavaScript in your C++ app!

      small_birdS Offline
      small_birdS Offline
      small_bird
      wrote on last edited by
      #10

      @jsulm Actually, it is not c++. It is QML and javascript.

      jsulmJ 1 Reply Last reply
      0
      • small_birdS small_bird

        @jsulm Actually, it is not c++. It is QML and javascript.

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #11

        @small_bird Good to know. I already asked you whether you're using QML you said no...
        If you're using QML without C++ then I'm wondering how you can use QImage as you asked before?
        Take a look at http://doc.qt.io/qt-5/qtqml-javascript-topic.html

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • jsulmJ jsulm

          @small_bird I have no idea as long as you do not tell us how you're using JavaScript in your C++ app!

          small_birdS Offline
          small_birdS Offline
          small_bird
          wrote on last edited by
          #12

          @jsulm However, now, I want to exchange data between C++ and javascript.

          jsulmJ 1 Reply Last reply
          0
          • small_birdS small_bird

            @jsulm However, now, I want to exchange data between C++ and javascript.

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #13

            @small_bird Then exchange it between C++ and QML (check Qt documentation for this) and from QML then to JavaScript.
            Or do you want to remove QML completely?

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            small_birdS 1 Reply Last reply
            0
            • jsulmJ jsulm

              @small_bird Then exchange it between C++ and QML (check Qt documentation for this) and from QML then to JavaScript.
              Or do you want to remove QML completely?

              small_birdS Offline
              small_birdS Offline
              small_bird
              wrote on last edited by
              #14

              @jsulm yes I have done that. But how to exchange qimage from qml to javascript?

              jsulmJ 1 Reply Last reply
              0
              • small_birdS small_bird

                @jsulm yes I have done that. But how to exchange qimage from qml to javascript?

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #15

                @small_bird I don't know I would say it depends on that JavaScript three.js framework. Check it's API and data types.

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                small_birdS 2 Replies Last reply
                0
                • jsulmJ jsulm

                  @small_bird I don't know I would say it depends on that JavaScript three.js framework. Check it's API and data types.

                  small_birdS Offline
                  small_birdS Offline
                  small_bird
                  wrote on last edited by
                  #16

                  @jsulm No, the javascript's grammar is the same with three.js engine.

                  jsulmJ 1 Reply Last reply
                  0
                  • small_birdS small_bird

                    @jsulm No, the javascript's grammar is the same with three.js engine.

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #17

                    @small_bird What do you mean by "grammar" and "engine"? three.js is a 3D JavaScript framework/library, right? So you need to check its documentation if you want to use it.

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @small_bird I don't know I would say it depends on that JavaScript three.js framework. Check it's API and data types.

                      small_birdS Offline
                      small_birdS Offline
                      small_bird
                      wrote on last edited by small_bird
                      #18

                      Yes, that's it. I have checked that, but how to transmit qimage data between qml and js function as it is not a inner type?

                      jsulmJ 1 Reply Last reply
                      0
                      • small_birdS small_bird

                        Yes, that's it. I have checked that, but how to transmit qimage data between qml and js function as it is not a inner type?

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #19

                        @small_bird said in How to exchange data between qt and javascript?:

                        That's three.js engine is written by javascript.

                        Sure it is. That's not the point. It has an API, right? See its documentation: https://threejs.org/docs/index.html#manual/introduction/Creating-a-scene

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        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