I have a window with a Layout and a QLabel. The QLabel contains an image. The image should fill the QLabel's parent layout. Should the user decide to scale the window down, the image should shrink until it reaches a minimum size- at which point the window should no longer be scalable. Should the user decide to scale the window up, the image should grow. In both these cases, the aspect ratio of the image should be preserved.
I have managed to fill the QLabel's parent with the image using setScaledContents. However, the minimum size always seems to be the original size of the image file, nothing I define - when I do attempt to define it via QPixmap.scaled(), it makes the image extremely pixelated. And though I can scale the image up, the aspect ratio is never preserved.
I feel as though this should be fairly straightforward, but I am very lost. Help!