Felgo模拟器中的元素大小与真机上的显示大小相差较大

The element size in the Felgo simulator is quite different from the display size on the real machine

我发现在Felgo Live Client上显示的元素尺寸和真机上的尺寸差别很大,在Felgo Live上要大很多Client.The关键是显示比例两边不一样

有没有人遇到过这个问题,谢谢!

例如

AppButton {
    minimumWidth: 100
    minimumHeight: 100
    text:"HELLO"
}

简单的应用程序在具有不同 DPI、宽高比和屏幕分辨率的设备上甚至在具有不同方向的同一设备上表现不同是很正常的。
因此,如果您想将您的应用程序部署到不同的地方,您必须记住它们 devices.You 可以在 Felgo 的 Qt Scalability guide and this one 中阅读更多相关信息。

由于minimumWidth和minimumHeight是以像素为单位的,需要使用dp方式,见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"
}