Tutorial :How can I access the data from javascript by Qt?


I used webview to show the webpage,


in the HTML code I put some ajax code googleSearch. After I execute the program, the webview runs and there are results (pages links).

When I clicked any of the links they do not open. So what do I do to open the links I clicked?

How can I access the title of the links from the result of javascript in Qt?



That's not a URL, it's a Windows pathname. Also, it has troublesome unescaped backslashes: \201 is a string literal escape for the control character U+0081 in many languages (including JavaScript as per your tags, though the snippet does not appear to actually be JavaScript).

The URL form of that filename would look something like:


You can convert a filename into a URL using fromLocalFile().

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »