Home > Mobile >  QPushButton how to set the line spacing
QPushButton how to set the line spacing

Time:10-14

In the use of QPushButton to create objects and use the setText (" AB \ nCD "); Button controls display the input text will automatically wrap, but after the break, between line and line spacing is too big, how to set up the distance between line and line?

CodePudding user response:

No one reply!!!!!!!!!!!

CodePudding user response:

Try the font, count words count

CodePudding user response:

QFont attributes that do not directly set the line spacing method, only the rich text support line spacing setup QTextBlockFormat: : setLineHeight,
If you use the QML, the Text also support lineHeight property,
  •  Tags:  
  • Qt
  • Related