PDA

View Full Version : QWebView Vs JS



m41n1
22nd March 2008, 03:59
Hello all, i am still astonished using QWebView so I decided to start a personal project. I would like to create a little software based on this amazing widget ables to interact with Google Maps:).

To begin with, I thought it would be good to load a page with some markers on the map. Once the page is loaded (using loadFinished () signal), read (in a kind of way:confused:) the markers positions variables and import them into C++ variables. Is this possible? I can't get an idea on how to do that....I just thought I could parse the whole HTML file looking for this variables but, even so, I don't really know how to get the HTML that is being deplayed.:eek:

bpetty
12th May 2008, 21:53
Yeah, you can do that. You don't need the pages source because you can use XQuery. XQuery can easily return you everything you need.

bpetty
13th May 2008, 20:49
Note: I was probably wrong about the advice I gave. Most likely the page wont be structured well enough to use XQuery.



ui.webView->page()->mainFrame()->toHtml();


That will get you the page source.