← Back to Docs
  • index.html
  • Clayground
  • Clayground.Lab
  • DigitFace
  • Clayground 2026.7
  • DigitFace QML Type

    The reading as mono digits - the numeric face of an InstrumentScale. More...

    Import Statement: import Clayground.Lab

    Properties

    Detailed Description

    When the question is "what is the number", not "how far along". Digits large, the unit small beside them, an optional caption above and, when the scale is self-ranging, the range it settled on underneath - so a digital readout still says what it is reading against, which is the one thing a bare number never does.

    The number comes from LabLang.qty(), so it carries its SI prefix and the language's decimal separator: 0.05 A prints as "50.0 mA" here for the same reason it does in the readout beside it.

    Flat and unlit - no seven-segment skeuomorphism, no glow. It is print on paper, like everything else in a lab.

    Example usage:

    import Clayground.Lab
    
    InstrumentScale { id: volts; probe: "supply"; unit: "V"; min: 0; max: 12 }
    
    DigitFace {
        width: panel.body.width
        scale: volts
        label: "SUPPLY"
    }

    See also InstrumentScale, Gauge, BarFace, and ColumnFace.

    Property Documentation

    alignment : int

    Qt.AlignLeft (default), Qt.AlignHCenter or Qt.AlignRight.


    digitSize : real

    Pixel size of the number.


    frameRadius : real

    Corner radius of the frame - 0 when baked into a Texture.


    label : string

    Caption above the digits; empty hides the row.


    scale : InstrumentScale

    The measurement model this face draws.


    showFrame : bool

    Draw the panel background and border behind the face.


    showRange : bool

    Print the scale in force under the digits.

    Defaults to on for a self-ranging scale, where the selected range is part of the reading, and off for a fixed one.


    showUnit : bool

    Print the unit beside the number.