LineEdit style sheet
Unsolved
General and Desktop
-
Hi,
I have the following in my code:ui->LineEdit_Name->setStyleSheet("QLineEdit{ " "background-color:rgb(202, 255, 227);" "border: 2px solid gray;" "border-radius: 10px;" "padding: 0 8px;" "selection-background-color: darkgray;" "font-size: 16px;}" "QLineEdit:focus { " "background-color:rgb(192, 192, 255);}" );
This works from code. But is it possible to define this in the Designer?
When I choose change style sheet and addbackground-color:rgb(202, 255, 227); border: 2px solid gray; border-radius: 10px; padding: 0 8px; selection-background-color: darkgray; font-size: 16px; focus { background-color:rgb(192, 192, 255)} `` nothing happens though the window says it is a valid style sheet. Thank you for your help.
-
@gabor53
why don't you set the exact same stylesheet in the designer too?! -
QLineEdit{ background-color:rgb(202, 255, 227);
border: 2px solid gray;
border-radius: 10px;
padding: 0 8px;
selection-background-color: darkgray;
font-size: 16px;}
QLineEdit:focus { background-color:rgb(192, 192, 255);}Try to add this to your lineedit in the Designer.