开发者

Overlaying widgets on gstreamer video in qt

开发者 https://www.devze.com 2023-03-12 18:56 出处:网络
I have connected gstreamer to the QWidget using gst_x_overlay_set_xwindow_id(),and getting the video on the QWidget.How can we overlay another widg开发者_如何转开发et(e.g. pushbutton,combobox) on top

I have connected gstreamer to the QWidget using gst_x_overlay_set_xwindow_id(),and getting the video on the QWidget.How can we overlay another widg开发者_如何转开发et(e.g. pushbutton,combobox) on top of this video which is a transparent one.so that the buttons will be on top of the video which is in a QWidget


It depends on platform and which sink is used for video. Mostly sink is fully uses provided widget to render video. So, you should create another widget and show() it after show() of widget on which video is rendered. Video will be overlayed by top widget.

For second widget you need to add following flags:

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

Also you can try to trick with colorkey of the sink if you want to use one QWidget. But it depends on sink which you are using.

0

精彩评论

暂无评论...
验证码 换一张
取 消