Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. WebEngine - How to draw an animated SVG above a transparent web view?
Forum Update on Monday, May 27th 2025

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

Scheduled Pinned Locked Moved Unsolved QtWebEngine
webenginesvgtransparencybackground
1 Posts 1 Posters 603 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.
  • jeanmilostJ Offline
    jeanmilostJ Offline
    jeanmilost
    wrote on last edited by
    #1

    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
    1

    • Login

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