0

Is it possible to specify some style sheet properties for text of QCheckBox?

I'm interested in padding first of all...

I see that we can customize ::indicator of check box but I couldn't find any information about text.

  • look here: http://doc.qt.io/qt-5/stylesheet-reference.html. in the list of properties you'll find the properties supported by QCheckbox. here some working examples: checkbox.setStyleSheet('border: 2px solid black; padding: 10px; color: red; spacing: 50px; font: 14pt;') – a_manthey_67 Jan 19 '16 at 11:52
  • I couldn't find any properties for TEXT of QCheckBox in QT documentation. – Andrew Sheremetiev Jan 20 '16 at 08:37

1 Answers1

0

several text-specific style sheet properties are supported by QCheckBox, e.g. color, font, font-family, font-size, font-style, font-weight, text-decoration. padding is supported too (as padding in the whole widget) and by spacing you can set the distance between the checkbox and the text.

a_manthey_67
  • 4,046
  • 1
  • 17
  • 28