Search code examples
qtbackgroundqwidget

QWidget transparent background (but not the children)


I have a QWidget that contains a QPixmap and a QComboxBox in its Layout. I would like to set the background of the widget transparent (but I want to show the QPixmap and the QComboBox normally). How do I do that?


Solution

  • It is all well-explained in QWidget documentation: http://doc.qt.io/qt-5/qwidget.html#transparency-and-double-buffering