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. How to click a button in Qt WebEngine?
Forum Updated to NodeBB v4.3 + New Features

How to click a button in Qt WebEngine?

Scheduled Pinned Locked Moved Unsolved QtWebEngine
2 Posts 2 Posters 1.4k 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.
  • B Offline
    B Offline
    Boss
    wrote on 12 Nov 2016, 03:38 last edited by
    #1

    How to click a button in the newest Qt5.7 WebEngine?
    In the past Webkit, we could do this to click a button:

    QWebElement button = frame->findFirstElement("input[id=search]");
    button.evaluateJavaScript("this.click()");
    

    So, how can I do the same thing with Qt WebEngine?

    Thanks for any suggestion.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      p3c0
      Moderators
      wrote on 13 Nov 2016, 10:06 last edited by
      #2

      @Boss You will have to rely on pure JS. You can execute the script using runJavaScript.

      157

      1 Reply Last reply
      0

      2/2

      13 Nov 2016, 10:06

      • Login

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