Web content

You can use the WebView class to display dynamic web content in your application. You can display Internet content, HTML content provided inline in QML, or HTML content in the assets folder of your Cascades project. You simply supply a URL to WebView, and you can load a webpage in your app.

You can use the WebView class to view web documents. Each WebView object has an associated WebSettings object that you can reference to determine whether JavaScript, the Web Inspector, active text, or zoom are enabled. You can also set font sizes, style sheets, background colors, zoom settings, and more.

Screen showing the developer.blackberry.com web page in a WebView.

To change the appearance of the WebView, you can use any of the Control properties. You can modify the size, margins, width, height, and more. If you use a root Container in your app, you can use its properties to limit the size of the webpage that you present.

After you set up a WebView, you can perform the following actions:

You can learn more about WebView by visiting the links below.

Last modified: 2014-05-14

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus