Results 1 to 3 of 3

Thread: Access to WebElements through (Qt) WebKit2 Touch API

  1. #1
    Join Date
    May 2012
    Posts
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Access to WebElements through (Qt) WebKit2 Touch API

    How can we get access in Webkit2 to all WebElements x/y coordinates for a given loaded HTML page. Our problem is that the information we want is in the DOM but the DOM does not seem accessible through the WebKit2 Touch API.

  2. #2

    Default Re: Access to WebElements through (Qt) WebKit2 Touch API

    i want to known also!

  3. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Access to WebElements through (Qt) WebKit2 Touch API

    You can try to do this through evaluating custom JavaScript in the context of the web page.

    Qt Code:
    1. import QtWebKit 3.0
    2. import QtWebKit.experimental 1.0
    3.  
    4. WebView {
    5. id: webView
    6.  
    7. anchors.fill: parent
    8. anchors.margins: 5
    9.  
    10. onLoadingChanged: {
    11.  
    12. // if loading succeeded, evaluate the script and display its result
    13.  
    14. if (!loading && loadRequest.status === WebView.LoadSucceededStatus) {
    15.  
    16. var script = "(function() { return document.getElementById('text').innerHTML })()"
    17. experimental.evaluateJavaScript( input.script, function(result) {
    18. console.log( "result=" + result );
    19. } );
    20. }
    To copy to clipboard, switch view to plain text mode 

    Cheers,
    _

Similar Threads

  1. touch event
    By leoalvesmachado in forum Newbie
    Replies: 12
    Last Post: 20th February 2014, 09:07
  2. Qt embedded and touch screen
    By webquinty in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 30th June 2011, 17:03
  3. Replies: 1
    Last Post: 25th March 2011, 11:33
  4. Qt and touch functionality
    By rishiraj in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 23rd February 2009, 21:29
  5. Touch screen
    By rchaitanya in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 19th January 2009, 13:40

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.