Button over QVideoWidget
-
For QWidget Applications, will this ever be resolved - being able to stack QPushButton in front of a QVideoWidget, or must we always resort to QML and QTQuick applications? My application was already built as a Widget application. This is frustrating. I've spent many hours getting this to work. For my widget application, I have to throw in a dummy QQuickWidget in the stack (1px x 1px) just to get QT 6.7.3 to stack the QVideoWidget correctly inconsistently.
-
@QtFriend2024 Please read what @SGaist wrote. It will not work with widgets, but should work with QML.
@jsulm I need this problem solved without QML.
-
@jsulm I need this problem solved without QML.
@QtFriend2024 You mention that you managed to make it work with that workaround. Can you provide a minimal compilable example that shows it in action ?
-
One Solution Without QML
I've figured a way to get the QVideoWidget to stack behind QPushButton and QLabel in a Widgets application without using QML - the camera has to be started before the stacking order is set. Otherwise, the QVideoWidget gets forced to the front no matter what you do. This worked for me.