Force the resolution of my QML application
-
Hello, I have a problem with the resolution of my QML application. I develloped my application on a phone in 720p, everything was well positioned. I then tested my application on a phone with a 1080p screen and I saw that the application did not run in 720p but in 1080p. The window was in a corner at the top left, it did not rescaled. My question is: Is it possible to force the application to shoot in 720p even on 1080p phones?
Thank you in advance for your answers =)
-
Hi @DropNod
Yes it is possible, few instructions for your APP development.
-
Avoid hardcoded size or values for the Windows, Components, Layouts etc...
-
Please use the
Screen Pixel Density
to calculate size for proper rendering of the APP in different Resolution Devices. -
Refer https://www.mydevice.io/#tab1 for the Resolution details.
-
Always consider Physical width, height & ppi for the calculation.
-
width = Physical Width / Physical PPI
&height = Physical Height / Physical PPI
-
Code reference : Qt World Summit 2018 Conference App.
All the best.
-