Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.8.0
-
Android, armeabi-v7a
Qt Creator 4.2.0
Qt 5.8.0, GCC 4.9
Description
The QML WebView component fails to load pages from the Android assets virutal file system via the url property. The url used looks like*:*
assets:/filename.html
and the actual file is located under android/assets/ and can be found in the .apk archive that is created by qt deployment tool.
An error web page is displayed, containing:
Webpage not available
The webpage at assets:/filename.html could not be loaded because: net::ERR_UNKNOWN_URL_SCHEME
Assets file system is the approach I've tried because the documentation states that "Note: The WebView does not support loading content through the Qt Resource system."
Please note that a QML Image can and will normally display a file from the Android assets system by using a similar url as the one above (example: assets:/image1.png).
To exemplify, I have attached a small, sample application that uses the Android assets file system to load both an image (play button) and a web page (that uses the youtube API to display the video player).