Qt World Summit: Register Today!

scroll to text on the webpage

  • I am using QGraphicsWebView to display the html page.

    There is a search text. I am highlighting the search text using,
    page()->findText(schtext, QWebPage::HighlightAllOccurrences);
    Also I am showing the line where the searched text is found in a list view , since there can be more than one occurrence of the search text.
    on clicking the line, I am navigating to the page where the line is present.

    How to scroll to the text on the particular page.

    I tried findtext() and triggeraction(QWebPage::moveToPreviousLine) but of no help

Log in to reply