Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to scale QImage or QPixmap to fit the parent Width X Height?
heatblazer last edited by
I am trying to scale a PNG ( which I am not sure is right ) to match the parent WxH. Here is my code:
test3 = test3.scaled(width, height, Qt::IgnoreAspectRatio);
Where "width" and "height" are passed from parent class who calls this code. The result is shown here:
I want the screen to be filled with the background image. As in the examples with Qt::IgnoreAspectRatio is shown - it should fill to max width and height. Also - can I use SVG to achieve the effect without losing quality of the image? And what are the costs for rendering SVG?