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. Various DPI and QtQuick Designer
Forum Updated to NodeBB v4.3 + New Features

Various DPI and QtQuick Designer

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 238 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.
  • B Offline
    B Offline
    Brunoo
    wrote on last edited by
    #1

    Hi,

    I develop an application on iOS, Android, MacOS and Windows and i managed to handle various non integer DPI without glitches.
    I do it by specifying every sizes in iPad Retina resolution (264dpi) and a javascript function like this :

    function dp(value)
    {
    return Math.ceil(value * (currentDPI / 264))
    }

    Rectangle {
    width: dp(200)
    }

    It works realy great but i can't use the QtQuick Designer because it can't handle javascript function (Functions are not supported in a Qt Quick UI form. (M222))

    I know there is the QT_SCALE_FACTOR to do that but it create glitches with non integer scale factor because it doesn't round each value to align them on whole pixel.

    I must have missed something. Qt is meant to do cross platform, so there must be a good way to do this.

    Thank you.

    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