Can't grab image of WebView on Android
-
wrote on 19 Aug 2016, 07:06 last edited by
Hi,
I'm developing an application where I need to use WebView QML component to display simple formatted HTML file (TextEdit with RIchText style is not enough - it is not able to set background to whole table row). Also I have to implement menu, which overlaps WebView component. Because overlapping WebView is impossible, I grab image of webview component, hide webview and show grabbed image instead. It works on Windows, but on android it grabs transparent image of correct dimensions. Should I report this as a bug or is this problem related to unability to overlap webview? I've also tried this with qt5.6.1 and 5.7 with same result. Thanks for advice -
Hi,
I'm developing an application where I need to use WebView QML component to display simple formatted HTML file (TextEdit with RIchText style is not enough - it is not able to set background to whole table row). Also I have to implement menu, which overlaps WebView component. Because overlapping WebView is impossible, I grab image of webview component, hide webview and show grabbed image instead. It works on Windows, but on android it grabs transparent image of correct dimensions. Should I report this as a bug or is this problem related to unability to overlap webview? I've also tried this with qt5.6.1 and 5.7 with same result. Thanks for advice@arthurwozniak
the webview on mobile platforms is an "empty" qml element.
This empty qml element is used to position/layout and communicate with the native webview. This native webview is placed on top of your QML view.So this should make it clear why you have these problems?
-
@arthurwozniak
the webview on mobile platforms is an "empty" qml element.
This empty qml element is used to position/layout and communicate with the native webview. This native webview is placed on top of your QML view.So this should make it clear why you have these problems?
wrote on 19 Aug 2016, 07:31 last edited by@raven-worx Thank you, it's cleart to me now. One more question - is there any possibility of grabing image of webview on android excent taking screenshot and cropping it? I know this solution is not ideal, but can't rewrite whole app and its UI logic now.
3/3