Results 1 to 2 of 2

Thread: The access between WebView and HTML javascript

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2011
    Posts
    3
    Thanks
    1

    Question The access between WebView and HTML javascript

    Hi,

    I have a question about WebView element.

    I create a HTML file named "hfile.htm", and I use a WebView with the url property is "hfile.htm".

    Now my main.qml is like:

    Qt Code:
    1. import QtQuick 1.0
    2. import QtWebKit 1.0
    3.  
    4. Rectangle {
    5. width: 600
    6. height: 400
    7. WebView { id: webMap
    8. anchors.fill: parent
    9. url: "hfile.htm"
    10. }
    11. Rectangle { id: rec1
    12. width: 100
    13. height: 100
    14. color: "red"
    15. }
    16. }
    To copy to clipboard, switch view to plain text mode 

    Can I change the color property of Rectangle rec1 from javascript in hfile.htm??
    Attached Images Attached Images

Similar Threads

  1. QML webview and javascript/flash on pages
    By 0biwan in forum Qt Quick
    Replies: 0
    Last Post: 5th April 2011, 16:51
  2. Qml plugin in html inside WebView problem
    By xeento in forum Qt Quick
    Replies: 1
    Last Post: 29th January 2011, 13:27
  3. Replies: 2
    Last Post: 14th January 2011, 15:09
  4. getting javaScript from html
    By ashvindh in forum Qt Programming
    Replies: 1
    Last Post: 26th September 2010, 12:57
  5. QtWebKit access HTML manipulated by javascript
    By rbp in forum Qt Programming
    Replies: 1
    Last Post: 19th September 2009, 02:29

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.