Hi all I have problem with my QML code. I made mistake and I went to put certain size to elements and now I have problem when putting app on other devices. I will paste you my
It's unfortunately tricky to get perfect, as it's likely that as the screen size shrinks you might actually want the buttons to be bigger and to drop content from the screen to ensure the user can access and read everything ok.
But the general approach is actually to set a scale factor in the C++ side:
ctxt->setContextProperty("scale", /* put calculated scale factor here */);
And then on the QML side, use that everyone to scale all the objects:
Rectangle {
id:window
width: 602 * scale
height: 1000 * scale
That way you can adjust the scale variable to change everything's size. Having said that, many people end up with different QML files depending on the platform size though.