Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. Interacting QML and the browser via javascript client and vice versa?
Forum Updated to NodeBB v4.3 + New Features

Interacting QML and the browser via javascript client and vice versa?

Scheduled Pinned Locked Moved Solved Qt for WebAssembly
2 Posts 1 Posters 323 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.
  • J Offline
    J Offline
    jhayar
    wrote on last edited by
    #1

    Hi ,
    I',m thinking if this is possible on the QT WebAssembly ?

    I want to invoke Javascript client script of the browser from QML or c++ , is this possible ?

    for example
    I have "sample.js" and the content of it is
    function doSampleAlert(){
    alert("hello world");
    }

    then i will add it on the script tag of the .html generated file

    <script src="sample.js"></script>

    then on the QML i want to call that doSampleAlert() method from the javascript client

    via Component.onCompleted: doSampleAlert();

    and also javascript client can do the same , i want to call a method from the c++ or a function from the QML from the browser,

    is this possible ? thanks

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jhayar
      wrote on last edited by
      #2

      I have found the answer using emscripten , will mark this as solved

      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