Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt HTML5 in a transparent frame
Forum Updated to NodeBB v4.3 + New Features

Qt HTML5 in a transparent frame

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 824 Views 1 Watching
  • 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.
  • P Offline
    P Offline
    peanutman
    wrote on 17 Jul 2013, 07:49 last edited by
    #1

    Hello everyone,

    I'm trying to create a translucent/transparent frame/window where I can render some HTML (without background). In Qt Quick it was fairly easy to achieve the transparent window, but because of the HTML requirement I started of with the HTML5 project template.

    I then modified htmlapplicationviewer.cpp, Html5ApplicationViewerPrivate() to do:
    @parent->setAttribute(Qt::WA_TranslucentBackground);@

    This makes the frame transparent as expected, but as a lot of other posts mention the repainting of the frame if broken and I get something like this for the HTML5 template application (the stars you see is my desktop background, so the window is fully transparent as wanted):
    "http://i.imgur.com/IK5yfT1.png":http://i.imgur.com/IK5yfT1.png

    It seems that the repaint issue is known, but the solutions do not seem to work for me. Things I tried:

    • parent->setAutoFillBackground(false)
    • overwrite the repaintEvent() of the Html5ApplicationViewerPrivate as suggested "here":http://qt-project.org/forums/viewthread/24837.
    • messed with the palette and did setBrush(QPalette::Base, Qt::transparent); for parent and Html5ApplicationViewerPrivate.

    However, I did not find a solution. Anyone that can help me?

    1 Reply Last reply
    0

    1/1

    17 Jul 2013, 07:49

    • Login

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