Web content

You can use the WebView class to display dynamic web content in your app. You can display Internet content, HTML content provided in line 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 webpage in a WebView.

To change the appearance of the WebView, you can use any of the Control properties. You can change 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: 2015-03-31

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

comments powered by Disqus