-2

I have a QWidget which should take place over the central widget of my application which is a VideoWidget for playing video. The problem is that I can't set background of the QWidget to be transparent.

Eddy Alleman
  • 1,096
  • 2
  • 10
  • 21
Ali
  • 9

2 Answers2

1

Use a StyleSheet (you can do that in code with setStylesheet or in the ui file : RMB on the widget you want "Change stylesheet" or even in the properties tab)

for instance

"background-color: rgba(255, 255, 0, 50);"

gives a yellow transparant look:(example of a button used on top of another button) example of a button used on top of another button

With stylesheets you can control the look of a complete program or just the specific widgets you want. More info in the style sheet reference

Eddy Alleman
  • 1,096
  • 2
  • 10
  • 21
0

You could make the full Widget invisible:

QWidget::setHidden(true);
Altinsystems
  • 186
  • 2
  • 8