Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved WebEngine - How to draw an animated SVG above a transparent web view?

    QtWebEngine
    webengine svg transparency background
    1
    1
    337
    Loading More Posts
    • 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.
    • jeanmilost
      jeanmilost last edited by

      On a Qt Quick interface, I need to show a complex animated SVG image. As the standard SVG module didn't support the SVG I want to show, I tried to use a WebEngineView as a component to achieve my drawing.

      All works fine except that I cannot change the background color. I need my image to be shown above a colored background, however the image background is always white.

      I tried the following code:

      WebEngineView
      {
          id: wvWebEngineView
          anchors.fill: parent
          backgroundColor: "transparent"
          url: "qrc:/Resources/Images/tbackupextractor/im-loading-animation.svg"
      }
      

      This resolve the transparency issue, however the background is no longer cleared, and this result to a completely insane drawing:
      WebEngineSVG.png

      So how can I both turn my page background transparent AND show an animated SVG on it?

      1 Reply Last reply Reply Quote 1
      • First post
        Last post