• May 18, 2024, 03:40:28 am

Author Topic: [CODE EXAMPLE] QML Webview  (Read 1352 times)

0 Members and 1 Guest are viewing this topic.

Offline Allstar12345

  • Allstar Software Founder
  • Administrator
  • Forum Genius
  • ******
  • Posts: 5,235
  • Reputation: 812
    • Allstar Software
  • Current Phone: : OnePlus 8 Pro, Xperia 10, Nexus 6p, Jolla Phone, Nokia N8, Nokia 808 PureView, BlackBerry Z30
[CODE EXAMPLE] QML Webview
« on: October 21, 2012, 03:18:05 am »
Basic flickable webview layer

Code: [Select]
Flickable {
  id:webViewFlickr
  anchors.fill: parent
  width: parent.width
  height: parent.height
  contentWidth: Math.max(parent.width,1000)
  contentHeight: Math.max(parent.height,800)
  pressDelay: 200
  WebView {
  id: webView
  anchors.fill: parent
 
  preferredHeight: height
  preferredWidth: Math.max(parent.width,1000)
  url: "http://www.google.com/";
  }
}
 


Button and text field

Code: [Select]
TextField {
  id: myTextField;
  width: parent.width -70
  text: "Enter your url here"
  errorHighlight: true
  anchors.left: parent.left
  }
  Button {
  id: button
 
  anchors.right: parent.right
  text: "Go"
  onClicked: {
  webViewRect.reset(myTextField.text);
  }
}

Offline iChris701

  • Retired
  • Mass Poster
  • ***
  • Posts: 1,020
  • Reputation: 332
  • Find Me On Twitter : https://twitter.com/#!/iChris701
Re: [CODE EXAMPLE] QML Webview
« Reply #1 on: October 21, 2012, 01:40:08 pm »
thanks :)  +2

Offline Allstar12345

  • Allstar Software Founder
  • Administrator
  • Forum Genius
  • ******
  • Posts: 5,235
  • Reputation: 812
    • Allstar Software
  • Current Phone: : OnePlus 8 Pro, Xperia 10, Nexus 6p, Jolla Phone, Nokia N8, Nokia 808 PureView, BlackBerry Z30
Re: [CODE EXAMPLE] QML Webview
« Reply #2 on: October 21, 2012, 10:06:58 pm »