new bee here. I am trying something very simple and it is not working and I cannot figure out why.
I am on windows and according to to the documentation, I can easily re-size an image using "fillMode: Image.PreserveAspectFit"
https://doc.qt.io/qt-6/qml-qtquick-image.html
Here is the QML code
import QtQuick
Image {
id: buttonId
width: 60
height: 100
source: "large1.png"
fillMode: Image.PreserveAspectFit
}
This is getting included from a parent QML as such:
RowLayout
{
anchors.centerIn: parent
spacing: spacerWidth
MyImage {
}
}
The source image is 334x484 px
but here is what I get when I render the page:
my window is set to 480x272
Window {
width: 480
height: 272
visible: true
title: qsTr("Test")
What such a simple scaling is not working?
thank you.