Fixed Aspect Ratio Widgets during Resize
-
I'm trying to fix a widget to 16x9 aspect inside a window that can be resized.
I've searched the forums and other places and seen lots of discussion of
int QLayoutItem::heightForWidth ( int w )
but no complete examples.Can someone modify my simple program to show me how to do this?
Here are the sources built version for LM17.
http://www.windyweather.net/wp/2014/07/23/qt-fixed-aspect-ratio-resize/
Thanks,
ww -
Hi,
The heightForWidth is good to use, you only need to add some spacers along with it to fill the empty space. One horizontal and a vertical one. That should do the trick.
It is really that simple.