QLabel and Background Transparency



  • I'm using stylesheets to control the overall theme of my application.

    In a number of instances, I have semi-transparent panels (90% transparency) which contain QLabel widgets who have their background-color style property set to be transparent. This works fine up until the point at which the text in the label changes, then the background is no longer transparent.

    If I force a re-paint of the container QWidget, then all becomes clear again (pardon the pun) however, I don't really want to do this parent re-paint every time a label is updated (there are 8 updatable QLabels on this particular QWidget) as it seems a fairly expensive thing to do.

    How can I maintain the transparency of a QLabel even when the text() has changed?


  • Qt Champions 2016

    Hi
    Tried to reproduce it but had no luck.
    alt text


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.