Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    How to get everything before and after selectedText() or selectedHTML() (or the start and end position of a selection)

    Qt WebKit
    1
    1
    615
    Loading More Posts
    • 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.
    • E
      erica81 last edited by

      Hi!

      I was wondering if anyone could suggest how to do the following:

      • when a user selects some text on a page in QWebView with their mouse
      • I want to get all the text preceding the selected fragment
      • and I want to get all the text succeeding it

      Or, alternatively, I would like to be able to get the start and end position of a selection so that I can get everything before and after the selected fragment from the page object directly.

      Cheers,
      Erica

      1 Reply Last reply Reply Quote 0
      • First post
        Last post