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 19 Aug 2016, 07:06 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

    R 1 Reply Last reply 19 Aug 2016, 07:21
    0
    • A arthurwozniak
      19 Aug 2016, 07:06

      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

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 19 Aug 2016, 07:21 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 19 Aug 2016, 07:31
      1
      • R raven-worx
        19 Aug 2016, 07:21

        @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 19 Aug 2016, 07:31 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

        1/3

        19 Aug 2016, 07:06

        • Login

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