how to set background transparent of button, lineedit?
-
wrote on 11 Sept 2016, 20:40 last edited by
-
Hi,
IIRC,
setAttribute(Qt::WA_TranslucentBackground);
is what you are looking for. -
wrote on 12 Sept 2016, 01:41 last edited by
I want to make transparent to default White background of button and lineedit .
-
Lifetime Qt Championwrote on 12 Sept 2016, 10:30 last edited by mrjj 9 Dec 2016, 10:31
Can be made with a stylesheet and
"background: transparent" -
Dont set directly on LineEdit
Set on its parent. (dialog/mainwind)
Then it works.
Or set as no Type
Try right click LineEdit, change stylesheet, and paste
background:transparent;
directly also works.For some reason, i have yet to learn, setting
QLineEdit
{
background:transparent;
}
directly on Edit. Do not work. (for me).
Only via parent. -
Dont set directly on LineEdit
Set on its parent. (dialog/mainwind)
Then it works.
Or set as no Type
Try right click LineEdit, change stylesheet, and paste
background:transparent;
directly also works.For some reason, i have yet to learn, setting
QLineEdit
{
background:transparent;
}
directly on Edit. Do not work. (for me).
Only via parent.wrote on 12 Sept 2016, 14:19 last edited by@mrjj said in how to set background transparent of button, lineedit?:
background:transparent;
i tried all but did not work anything
-
hi
try this test proj
https://www.dropbox.com/s/kfzvp58ko4iz53n/my_trans_edit.zip?dl=0 -
hi
try this test proj
https://www.dropbox.com/s/kfzvp58ko4iz53n/my_trans_edit.zip?dl=0 -
Lifetime Qt Championwrote on 12 Sept 2016, 14:59 last edited by mrjj 9 Dec 2016, 15:01
ok, u must override it from the other stylesheet then ?
Else i dont know.Is that the sample ?
No changes, just run it?
If yes, then what platform you are on, might not support it or the
Qt version you are using is having a bug on that platform. -
ok, u must override it from the other stylesheet then ?
Else i dont know.Is that the sample ?
No changes, just run it?
If yes, then what platform you are on, might not support it or the
Qt version you are using is having a bug on that platform. -
@takoo
ok. I have had issue on mint with xfce4.
Some stuff that worked in Kubuntu and windows did render differently on mint.
That was also 5.5.
Not sure if bug or what.Could you test on other windows manager?
-
@takoo
ok. I have had issue on mint with xfce4.
Some stuff that worked in Kubuntu and windows did render differently on mint.
That was also 5.5.
Not sure if bug or what.Could you test on other windows manager?
-
@takoo
Super if possible.
I love mint + xfce4 but i did have some issues with rendering and dialogs
that fall behind parent.So test transparent on other setup if u can and see if that is different :)
-
@takoo
Super if possible.
I love mint + xfce4 but i did have some issues with rendering and dialogs
that fall behind parent.So test transparent on other setup if u can and see if that is different :)
5/16