Qt – Fixed Aspect Ratio Resize

Sorry. This is a support post. I used to be able to hide such posts from the front page. But not here.

Here’s a simple example:


Please modify the files and let me know how to accomplish this.

I’m using

Qt Creator 3.1.2 (opensource)
Based on Qt 5.3.1 (GCC 4.6.1, 64 bit)
Built on Jun 23 2014 at 04:09:33
on Linux Mint 17


QtCreator 2.8.1
Based on Qt 5.1.1 (MSVC 2010 32bit)
Build on Aug 26, 2013
on Win 7 x64