If you define QColorwith alpha 0, you get a background with a transparent color, for example:
QColor bg_color(255, 0, 0, 0);
QPalette p(l.palette());
p.setColor(QPalette::BackgroundColor, bg_color);
l.setPalette(p);
What should make the background shortcut any transparent color.
source
share