I'm trying to create a floating, layout-less widget but it doesn't seem to work with a QVideoWidget
as it's parent?
Working MRE:
from PySide6 import QtWidgets as qtw
app = qtw.QApplication()
w1 = qtw.QWidget()
w2 = qtw.QWidget(w1)
w2.setStyleSheet("background-color: red")
w1.show()
w2.show()
app.exec()
Not working MRE:
from PySide6 import QtMultimediaWidgets as qtmw
from PySide6 import QtWidgets as qtw
app = qtw.QApplication()
w1 = qtmw.QVideoWidget()
w2 = qtw.QWidget(w1)
w2.setStyleSheet("background-color: red")
w1.show()
w2.show()
app.exec()
The code is supposed to overlay a red QWidget
over the QWidget
/QVideoWidget
but the red QWidget
is shown only when the parent is a QWidget
, and not when it's a QVideoWidget
, why could that be?