qt - How to add a button with image and transparent background to QVideoWidget? -


i created pushbutton in front of video (use qvideowidget , qmediaplayer). using image transparent background set image button.

how can set qpushbutton transparent, image inside visible? have tried setting transparent, image's background turns black.

i have tried c++ on qt : controlling transparency of labels , buttons doesn't work. , tried :

ui->btn_touchme->setattribute(qt::wa_translucentbackground);  ui->btn_touchme->setstylesheet("qpushbutton{background: transparent;}");  ui->btn_touchme->setattribute(qt::wa_nosystembackground, true);  ui->btn_touchme->setattribute(qt::wa_translucentbackground, true); 

and still black

i tried using qlabel, got same result. suggestions me?

i using qt 5.3.2 , ubuntu 14.04lts

if ok show button margin on mouse hover on button, can use qtoolbutton autoraise set true.

also, can set following stylesheet make button transparent when mouse hovers on it.

ui->btn_touchme->setstylesheet("background-color: rgba(255, 255, 255, 0);"); 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -