Reputation: 141
I found that the size of the element displayed on the Felgo Live Client is very different from the size displayed on the real device, which is much larger on the Felgo Live Client.The key is that the display ratios on both sides are not the same.
Has anyone encountered this problem, thanks!
E.g.
AppButton {
minimumWidth: 100
minimumHeight: 100
text:"HELLO"
}
Upvotes: 0
Views: 51
Reputation: 141
Since the minimumWidth and minimumHeight are in pixels, you need to use the dp method, see https://felgo.com/doc/felgo-supporting-multiple-screens-and-screen-densities/#density-independence-support-dp-sp-pixeltoinches-tablet-orientation
AppButton {
minimumWidth: dp(100)
minimumHeight: dp(100)
text:"HELLO"
}
Upvotes: 1
Reputation: 1212
It's quite normal for simple applications to behave differently on devices with different DPIs,aspect ratios and screen resolutions or even on the same device with a different orientation.
So you have to keep them in mind if you want to deploy your app into different devices.You can read more about that in the Qt Scalability guide and this one from Felgo.
Upvotes: 1