Transparent background
-
Hi
Is there possible to set QTabWidget background transparent (same as the form background)?
I tried this in the main.cpp but nothing has changed, I got a white background:
@
QPalette q= form.widget.tab->palette();
form.widget.tab->setPalette(q);
form.widget.tab->setStyleSheet("background-color: rgba( 255, 255, 255, 0% );" );
@
What I'm doing wrong?
Is there possible to write it in the qss file?Thank you for your help!!!!
Massi
[Edit: Please be sure and wrap your code in @ blocks; mlong]
-
Hai,Massinissa.
Try to use this command.It gives the solution for your problem.@
QPalette palette = view->palette();
palette.setBrush(QPalette::Base, Qt::transparent);
view->page()->setPalette(palette);
view->setAttribute(Qt::WA_OpaquePaintEvent, false);
@ -
Hi
Try replacing this:
@
"background-color: rgba( 255, 255, 255, 0% );"
@
with this one:
@
"background: transparent;"
@ -
I did it but still getting a white background instead of transparent
-
you need to declare view??
-
Have a look at at "this link":http://qt-project.org/forums/viewthread/1107. There are plenty of threads related to the topic of "transparent background":http://qt-project.org/search?search=transparent+background.
-
@soroush work for me ! thanks !