Hey there,

I've subclassed QLineEdit and I'm doing the following to get a padding and a custom background color :

Qt Code:
  1. q->setStyleSheet("padding-left: 24px;");
  2. QPalette p = palette();
  3. p.setColor(QPalette::Text, palette().color(QPalette::HighlightedText));
  4. p.setColor(QPalette::Base, Qt::black);
  5. 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 ?