title: I want qt window to resize proportional
body: <p>Just as the title said, when I resize the window, if I make it widen , I want the window's height resize proportional to make the window has the same ratio.
  I just do the logic in paintEvent, but it doesn't work fine, can some guys have any solution?</p>
  
  <p>I don't think do resizing in resizeEvent is a great way, the best result is that window flickering,  but I want the fluent way</p>