Results 1 to 2 of 2

Thread: Transparency problem with stacked widgets

  1. #1
    Join Date
    Nov 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Transparency problem with stacked widgets

    Hi,

    I've run into a problem with one of my Qt applications ever since I moved from 4.6 to 4.7. It's a monitoring application a bit like SuperKaramba, and it's possible to define transparent widgets that overlap (for example, an image overlaid on some text). The problem I'm having is that any time there is a widget over a text label, if the text on the label changes I get a flash of duplicated content. I've attached a screenshot that shows the problem. You can see there are spots where the translucent white overlay seems to be showing twice over a couple of text labels, particularly the top Mem and Net In labels. Those are the labels where the text just changed.

    As I mentioned, this never happened on 4.6 so obviously something changed in 4.7 and I'm wondering if anyone has any idea what that would be. I've tried fiddling with different widget flags and such, but nothing I've tried has made a difference. I even tried erasing the entire window in the paint event to make sure nothing was being left over somehow.

    Would appreciate any advice on this since it's incredibly annoying having something flickering in an app that's constantly on the screen like this. Thanks.

    It appears the my image got resized when I uploaded it, so here's a link to the full version: http://www.nemebean.com/stuff/TransparencyProblem.png Also, the full source for the app can be found at https://github.com/cybertron/whee I can post some smaller code snippets if there's something in particular you're looking for.
    Attached Images Attached Images

  2. #2
    Join Date
    Nov 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Transparency problem with stacked widgets

    FWIW, I did finally come up with a workaround for this. I hide the label, change the text, and then reshow the label. For some reason this eliminates the ghosting. It's a pretty vicious hack IMHO, but since I haven't found a better solution in the year or more since this started happening, I'll take it.

Similar Threads

  1. transparency problem. pls help.
    By marc2050 in forum Qt Programming
    Replies: 9
    Last Post: 3rd August 2011, 19:51
  2. QX11EmbedContainer transparency problem
    By nalexvs in forum Qt Programming
    Replies: 0
    Last Post: 2nd December 2010, 18:38
  3. Semi-transparency through parents' widgets
    By Anatoly in forum Qt Programming
    Replies: 2
    Last Post: 21st December 2009, 09:23
  4. Problem with a dialog transparency
    By ManicQin in forum Qt Programming
    Replies: 0
    Last Post: 27th May 2009, 09:11
  5. problem in stacked widget
    By wagmare in forum Qt Programming
    Replies: 4
    Last Post: 24th February 2009, 08:28

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.