Can't grab image of WebView on Android



  • 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


  • Moderators

    @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?



  • @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.



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.