Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
real ruler on iOS and android
zenghsing last edited by
In fact, I want to try to zoom-in and zoom-out my screen.
But my first thing it to set the real size on my screen for each object.
Hence, I want to put a ruler to measure my each object on my app.
My first thing is to know how to set the ratio for each object length.
I find some document, but I still have no idea.
console.log("Screen.pixelDensity : "+Screen.pixelDensity) console.log("Screen.devicePixelRatio : "+Screen.devicePixelRatio)
How to translate to my real scale? How to get the ratio?
What function could I use in QML and widgets ?