0

I have an option to change the text font size on a label, now without layout . how I can change the font pointSize of the text based on the parent window resized height. so how I can calculate the factor of height increased and based on the factor I can multiply my pointSize of font.

Wagmare
  • 1,354
  • 1
  • 24
  • 58
  • yes the window can be resized and the font value can be changed based on QFontDialog value. so i set the default window height (m_defaultHeight)and did like factor = (this.height()/m_defaultHeight), inside resizeEvent and multiply it with font pointSize. – Wagmare May 16 '16 at 08:26
  • That sounds about right, what's the problem then? – Frank Osterfeld May 16 '16 at 08:46
  • actually i was checking any other proper way of doing it because here im hardcoding some height Ex: m_defaultHeigth. – Wagmare May 16 '16 at 08:51

0 Answers0