Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Scraping all of WebEngineView to a QString

Scraping all of WebEngineView to a QString

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 540 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.
  • James SprinksJ Offline
    James SprinksJ Offline
    James Sprinks
    wrote on last edited by
    #1

    Hi All I have loaded a URL into a WebEngineView as follows:

    QUrl site("http://192.168.100.41");
     ui->screen->load(site);
    

    And have selected all the text on screen as follows:

    ui->screen->page()->triggerAction(QWebEnginePage::SelectAll);
    

    Can anyone help me to copy this selected text to a QString or some other variable? I need to do some searching on this data...

    Thanks

    J

    jsulmJ 1 Reply Last reply
    0
    • James SprinksJ James Sprinks

      Hi All I have loaded a URL into a WebEngineView as follows:

      QUrl site("http://192.168.100.41");
       ui->screen->load(site);
      

      And have selected all the text on screen as follows:

      ui->screen->page()->triggerAction(QWebEnginePage::SelectAll);
      

      Can anyone help me to copy this selected text to a QString or some other variable? I need to do some searching on this data...

      Thanks

      J

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @James-Sprinks What about http://doc.qt.io/qt-5/qwebenginepage.html#selectedText-prop
      And you can search directly using http://doc.qt.io/qt-5/qwebenginepage.html#findText

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2

      • Login

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