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. Accessing the DOM
Forum Updated to NodeBB v4.3 + New Features

Accessing the DOM

Scheduled Pinned Locked Moved Unsolved QtWebEngine
4 Posts 2 Posters 565 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.
  • J Offline
    J Offline
    jferguson
    wrote on last edited by
    #1

    Hello,

    I'm trying to write a basic webspider and reviewing my options in doing so I came across Qt's QtWebEngine.

    It appears that my only option for accessing the DOM is via javascript injected into the rendered page, but that appears to be one-sided in the sense that I can, e.g., highlight all links, but I have no mechanism for communicating which nodes are links from JS back to C++.

    Is my understanding there correct?

    M 1 Reply Last reply
    0
    • J jferguson

      Hello,

      I'm trying to write a basic webspider and reviewing my options in doing so I came across Qt's QtWebEngine.

      It appears that my only option for accessing the DOM is via javascript injected into the rendered page, but that appears to be one-sided in the sense that I can, e.g., highlight all links, but I have no mechanism for communicating which nodes are links from JS back to C++.

      Is my understanding there correct?

      M Offline
      M Offline
      mpergand
      wrote on last edited by
      #2

      Hi @jferguson ,

      Have a look at:
      https://doc.qt.io/qt-6/qwebchannel.html

      J 1 Reply Last reply
      0
      • M mpergand

        Hi @jferguson ,

        Have a look at:
        https://doc.qt.io/qt-6/qwebchannel.html

        J Offline
        J Offline
        jferguson
        wrote on last edited by
        #3

        @mpergand Hi, thanks. Looking at it briefly the answer seems to be to delete Qt and find another option-- injecting another javascript seems absurd. However, thank you none the less because that does appear to solve the problem.

        J 1 Reply Last reply
        0
        • J jferguson

          @mpergand Hi, thanks. Looking at it briefly the answer seems to be to delete Qt and find another option-- injecting another javascript seems absurd. However, thank you none the less because that does appear to solve the problem.

          J Offline
          J Offline
          jferguson
          wrote on last edited by
          #4

          EDIT: In fairness I know this isn't a Qt related problem, Qt actually offers the (ugly, hackish) solution-- its a byproduct of the multi-process architecture of Chrome (and Webkit has the same limitation)

          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