Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Qt runJavaScript multiple parameters

Qt runJavaScript multiple parameters

Scheduled Pinned Locked Moved Unsolved QtWebEngine
2 Posts 2 Posters 758 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.
  • A Offline
    A Offline
    a_d_m
    wrote on last edited by
    #1

    Hi, I'm new here and with QT development

    I'm trying to call a javascript function from C++ and I'm able to pass a parameter as the example below, but I loke to change it to many parameters, is it possible? How can I do it. Thanks

    //QT function calling Js
    webview->page()->runJavaScript("changeHtmlText('Text has been replaced by C++!');");

    //Js Function
    function changeHtmlText(newText)
    { $("#infotext").html(newText); }

    This is and "one" parameter function, I'd like to change it to many parameters

    JonBJ 1 Reply Last reply
    0
    • A a_d_m

      Hi, I'm new here and with QT development

      I'm trying to call a javascript function from C++ and I'm able to pass a parameter as the example below, but I loke to change it to many parameters, is it possible? How can I do it. Thanks

      //QT function calling Js
      webview->page()->runJavaScript("changeHtmlText('Text has been replaced by C++!');");

      //Js Function
      function changeHtmlText(newText)
      { $("#infotext").html(newText); }

      This is and "one" parameter function, I'd like to change it to many parameters

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @a_d_m
      QWebEnginePage::runJavaScript() executes a JS script, passed to it as a text string. What "many parameters" do you mean?

      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