简体   繁体   中英

Overlaying widgets on gstreamer video in qt

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 widget(eg 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM