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
QLabelwidgets who have theirbackground-colorstyle property set to betransparent. 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 updatableQLabelson this particularQWidget) as it seems a fairly expensive thing to do.How can I maintain the transparency of a
QLabeleven when thetext()has changed? -
Hi
Tried to reproduce it but had no luck. -
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
QLabelwidgets who have theirbackground-colorstyle property set to betransparent. 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 updatableQLabelson this particularQWidget) as it seems a fairly expensive thing to do.How can I maintain the transparency of a
QLabeleven when thetext()has changed?@webzoid You can use setvisible (true) And (False) and make a transparent even when the text has changed