Hi all,
I have to make one application in which I need to make my Line Edit transparent.....
if anyone knows that How to make Line Edit transparent then please reply.....
Hi all,
I have to make one application in which I need to make my Line Edit transparent.....
if anyone knows that How to make Line Edit transparent then please reply.....
Hey Marek I make it using following code..
QPalette p;
p.setColor(lineEdit->backgroundRole(), Qt::transparent);
lineEdit->setPalette(p);
But The problem is that the border of the line edit is disturbing my project.... Means I also want to make border transparent.... Is there any way to do that???
Added after 26 minutes:
I solve the problem simply using the stylesheet....
lineEdit->setStyleSheet(QString::fromUtf8("border:0px;""bac kground:transparent"));
Last edited by RENOLD; 16th February 2012 at 13:15.
Try to avoid stylesheets if possible and use QPalette to do what you want.
simples.Qt Code:
QPalette palette; lineEdit->setPalette( palette ); lineEdit->setFrame( false );To copy to clipboard, switch view to plain text mode
Bookmarks