I was trying to write a web enabled app using QtWebKit. I couldn't really get from the examples how I could extract link elements from a web page. A small code snippet will be very helpful.
Thanks
I was trying to write a web enabled app using QtWebKit. I couldn't really get from the examples how I could extract link elements from a web page. A small code snippet will be very helpful.
Thanks
Get the HTML of your site and then use a QRegExp to extract the links. There are may examples for the regular expression for extracting links on the web.
Thank you for the reply. Is it not possible to use any of the QtWebkit classes to achieve this? In the examples included with Qt Assistant they exhibit dom extraction techniques. I just couldn't figure out how I could use those to search for links on a page based on the text contained between <a> & </a>
You also can use QWebFrame::findAllElements(). there are many ways.
Bookmarks