I am trying to highlight the selected text in QWebEngineView.
Issue is all the matches are highlighted and along with the one I selected.
Also the color is some default color. The one I selected is one color and rest matches in "yellow"
Code:
{ findText(str); * m_Color.setNamedColor(color.toUpper()); QString js = QString(QLatin1String("document.execCommand(\"%1\",false, \"%2\")")).arg(cmd).arg(clrName); page()->runJavaScript(js); }
Kindly help me to highlight only the text which I have selected.