0

For example, I want set the QFont weight 120 pixels or 1.5mm. Now, the weight has been defined by enumeration of 0~99, that's not my need. I upload two images for example: normal text

expand text

  • Font weight is a subjective quantity and the actual meaning of a weight of, say, 50 is down to the font/typeface designer. That being the case you might want to clarify exactly what you mean when you say `"...I want set the QFont weight 120 pixels or 1.5mm"`. – G.M. Apr 10 '22 at 10:08
  • I have upload example image,you can check the image link. – user18737700 Apr 11 '22 at 01:12
  • The expand result like setWeight, But, I want , the character expand more, 99 is not enough. – user18737700 Apr 11 '22 at 01:29

1 Answers1

0

You want to use the pointSize property, not weight.

setPointSize

mzimmers
  • 857
  • 7
  • 17
  • Thanks for your answer! setPointSize is change text size, I want expand the text. – user18737700 Apr 10 '22 at 06:49
  • I guess I don't understand your question, then. Text size is determined by point size, which defines the outer perimeter of the character, and weight, which defines hot "thick" the character appears. Which are you trying to change? – mzimmers Apr 10 '22 at 16:58
  • I add the example images , normal text and expand text ,two links, you can click the link and check them. – user18737700 Apr 11 '22 at 01:19
  • The expand result like setWeight, But, I want , the character expand more, 99 is not enough. – user18737700 Apr 11 '22 at 01:30
  • Oh, so you're saying you want a heavier weight than the given maximum? I'm just guessing now, but I think you'd have to create your own font for that, which would be a lot of work. This isn't an area I've ever worked in...sorry. – mzimmers Apr 11 '22 at 16:35
  • You have give a clue——“create your own font”. Thank you again. – user18737700 Apr 12 '22 at 00:40