Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Can't grab image of WebView on Android
Forum Update on Monday, May 27th 2025

Can't grab image of WebView on Android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
webviewandroidqt5.6qt5.7qml
3 Posts 2 Posters 1.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    arthurwozniak
    wrote on last edited by
    #1

    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

    raven-worxR 1 Reply Last reply
    0
    • A arthurwozniak

      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

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

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

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      A 1 Reply Last reply
      1
      • raven-worxR raven-worx

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

        A Offline
        A Offline
        arthurwozniak
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved