Advertisement
Guest User

QML WebView example for Sailfish (not working)

a guest
Sep 26th, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import QtQuick 2.0
  2. import Sailfish.Silica 1.0
  3. import Sailfish.Silica.theme 1.0
  4.  
  5. import QtWebKit 3.0
  6.  
  7.  
  8. Page {
  9.     id: page
  10.    
  11.     // To enable PullDownMenu, place our content in a SilicaFlickable
  12.     Rectangle {
  13.         color: "green"
  14.         anchors.fill: parent
  15.        
  16.         WebView {
  17.             anchors.centerIn: parent
  18.             width: 200
  19.             height: 200
  20.             url: "www.google.com"
  21.  
  22.             onLoadingChanged: {
  23.                 console.log("WV: onLoadingChanged, status is " + status);
  24.                 console.log("VW: LoadFailedStatus is " + WebView.LoadFailedStatus)
  25.                 console.log("VW: LoadSucceededStatus is " + WebView.LoadSucceededStatus)
  26.             }
  27.         }
  28.  
  29.     }
  30.  
  31.     Component.onCompleted: {
  32.         console.log("Page 1 component completed")
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement