Qt World Summit: Register Today!

What happened to expressing QML dimensions in points?

  • Back at Qt Dev Days 2014, I saw that Qt 5.5 would support expressing QML dimensions in units that correspond to real world measurements, like:

    Rectangle {
      color: 'red'
      width: 72 pt
      height: 24 pt

    I cannot find any information about this now. What happened? Is it supported? Does it require C++11 compiler support?

  • Lifetime Qt Champion


    I think that this mail conversation might be of interest

  • When I was preparing my presentation on "Using SVG images in QML" in 2014, I was aware of a check-in into the Qt code base to support unit notation like "width: 72 pt", but for the life of me I cannot find any more details.

    There are huge problems with resolution reporting on various platforms so "72 pt" usually does not equal an inch on the screen. Was the feature never committed to the master branch? Is it there and I just cannot find the documentation?

    The 2014 presentation used a QML solution for specifying units and I've been using a C++ version of the same design lately. The mail conversation you posted sounds like the same thing as it has the same limitations that my design suffers -- poor support for differing screen resolutions.

  • Lifetime Qt Champion

    Did you check if there's a wip branch for that ?

    You should get into the conversation, it seems you have enough experience with that problem to bring it further.

Log in to reply