0

Is it possible to format QToolButton text with HTML like in QLabel? toolbutton.SetText("Text <b>Test</b>") doesn't work

Dibo
  • 1,159
  • 17
  • 34

1 Answers1

2

I don't think this is possible without subclassing QToolButton and overriding the paintEvent, but if you just want to style the text in the button, you can use Qt Style Sheets like this:

toolButton->setStyleSheet("font-weight: bold");
mutil
  • 3,205
  • 1
  • 27
  • 34