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. Acces to HTML element in a WebEngineView

Acces to HTML element in a WebEngineView

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 839 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.
  • F Offline
    F Offline
    Fab01
    wrote on last edited by A Former User
    #1

    Hello all, i try to figure it out how works QML WebEngineView and how I can acces html element in it (read/write).
    The documentation is not clear for me, so here what I want to do.

    In a WebEngineView, I load an html page with only two INPUT elements in it, a "text" element and a "password" element.

    1. I want to show a QML keyboard of my own when a mouseclic event occur only in these two elements

    2. How can I automatic fill the values of these elements ?

    I guess runjavascript method is what I need but I don't understand how it could interact with my QML.

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Fab01
      wrote on last edited by Fab01
      #2

      I tried this:

      var js="function testclic(){var index, inputs; inputs = document.getElementsByTagName('INPUT');\
                                                          for (index = 0; index < inputs.length; ++index)\
                                                          {\
                                                              inputs[index].onfocus = function()\
                                                              {\
                                                                  return(33);\
                                                              }\
                                                          } return(-1);} testclic()"
       
       web_view.runJavaScript(js,function(result){console.log("res "+result);})
      

      but I never reach the onfocus...some advices ?

      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