Hey there,
I've subclassed QLineEdit and I'm doing the following to get a padding and a custom background color :
q->setStyleSheet("padding-left: 24px;");
setPalette(p);
q->setStyleSheet("padding-left: 24px;");
QPalette p = palette();
p.setColor(QPalette::Text, palette().color(QPalette::HighlightedText));
p.setColor(QPalette::Base, Qt::black);
setPalette(p);
To copy to clipboard, switch view to plain text mode
For some reason:
- when applying my style sheet my QLineEdit background goes blank, even if I force it to black.
- If I remove the padding line, everything works.
Why ?
Bookmarks