Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-57370

[QWebEngineView] Method findText returns found texts but SelectedText returns empty QString

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.8.0 Beta
    • WebView
    • None
    • Window

    Description

      Now I try to find all text matched in a page.

      The problem is QWebEngineView::SelectedText return an empty QString after searching text(which success and highlight the matched texts ).

      And I followed another way by using a javascript function: "document.getSelection().toString()" (called via runJavascript method) which it's equal to "QWebEngineView::SelectedText" and i got the same result.

      Finally, i check the QWebEngineView::SelectedText method by connecting the signal textSelectionChange and do select text manually and print selected text on the slot function, it works properly, but this signal was not fired when findText success? and then SelectedText return empty QString in the case i use findText function.

      May be Qt have changed this function behavior?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            stromme Christian
            buitrung Bui Trung
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes