1. The title of this post says that he want to use QStyle.
2. Qt Docs says:Customizing a dialogs background with QStyle
For example, the following style sheet specifies that all QLineEdits should use yellow as their background color, and all QCheckBoxes should use red as the text color:
QLineEdit { background: yellow }
QCheckBox { color: red }
For this kind of customization, style sheets are much more powerful than QPalette.
Bookmarks