Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. real ruler on iOS and android
Forum Updated to NodeBB v4.3 + New Features

real ruler on iOS and android

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 312 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • zenghsingZ Offline
    zenghsingZ Offline
    zenghsing
    wrote on last edited by
    #1

    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.

    http://doc.qt.io/qt-5/qml-qtquick-window-screen.html

            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 ?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved