Results 1 to 3 of 3

Thread: QWebView Vs JS

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question QWebView Vs JS

    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) 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.

  2. #2
    Join Date
    Aug 2006
    Posts
    90
    Thanks
    6
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QWebView Vs JS

    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.

  3. #3
    Join Date
    Aug 2006
    Posts
    90
    Thanks
    6
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QWebView Vs JS

    Note: I was probably wrong about the advice I gave. Most likely the page wont be structured well enough to use XQuery.

    Qt Code:
    1. ui.webView->page()->mainFrame()->toHtml();
    To copy to clipboard, switch view to plain text mode 

    That will get you the page source.

Similar Threads

  1. QWebview not showing images
    By manojmka in forum Qt Programming
    Replies: 27
    Last Post: 16th July 2012, 23:22
  2. Problem With QWebView
    By ivi2501 in forum Qt Programming
    Replies: 8
    Last Post: 2nd August 2009, 19:37

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.