PDA

View Full Version : (GUI) How to make transparent the background of a QLineEdit ?



oldFox64
25th February 2014, 17:22
Having this:
10081

My intention is to make a file selector, so when the file has been selected, I want to show the selected file in the QLineEdit field. I want this field to be transparent, but didn't find any method.

Scorp2us
25th February 2014, 18:38
I think you have to set it to not paint the background. Look at the window flags.

ChrisW67
26th February 2014, 02:01
I do not see the connection between "I want to show the selected file in the QLineEdit field" and "I want this field to be transparent".

This seems to do the trick for me:


lineedit->setStyleSheet("* { background-color: rgba(0, 0, 0, 0); }");

oldFox64
26th February 2014, 07:10
I want the background to be transparent, not the content. That's worked, ty!