Overlay widget on gstreamer video in qt

I connected gstreamer to a QWidget using gst_x_overlay_set_xwindow_id () and get the video in a QWidget. How can we overlay another widget (like a button switch, combobox) on top of this video, which is transparent. So the buttons will be on top of the video, which is in QWidget

+3
source share
1 answer

It depends on the platform and which sink is used for the video. Basically, the receiver makes full use of the provided widget to render the video. Thus, you must create another widget and show () it after show () the widget on which the video is displayed. The video will be overlaid with the top widgets.

For the second widget, you need to add the following flags:

setAttribute(Qt::WA_TranslucentBackground);
setStyleSheet("background:transparent;");

colorkey , QWidget. , .

0

All Articles