Skip to content

dpconfig widgets

Bee edited this page Apr 18, 2025 · 28 revisions

All text can be formatted in HTML. To know more about what's acceptable and not, see Qt's documentation page.

Type: text

Shows text.

  • text: Text to show. May be formatted in HTML. Required.

Type: title or heading

Essentially the same as type text, but a different size.

  • text: Text to show. May be formatted in HTML. Required.

⚠ Titles and headings have different sizes! Title is the largest one, heading is smaller.

Type: image

Renders a picture.

  • file: Local path (in the archive) to the image. Required.
  • width: Scale the image to this width, in pixels.
  • height: Scale the image to this height, in pixels.

type: number or value

wip

  • text string: The option description. Required.
  • method string: The method to insert the input into. Required.
  • value object: Describes the value to accept as input. Required.
    • type string: Either int, percent or float. percent converts into float on export, but renders differently. Required.
    • default n: The default value.
    • range list: The range of acceptable values. A list of two options, the minimum and maximum, in that order. Both are inclusive.
    • step n: The amount to add/subtract when the up/down arrow is pressed. Does not affect what the user can type in manually.
    • suffix string: The suffix to add at the end of the number. Purely visual. Percentages use %, but this can be overwritten.

Example:

    {
        "type": "number",
        "text": "This is a value edit! It supports percentages, integers and floats.",
        "value": {
            "type": "float",
            "default": 1,
            "range": [
                0.25,
                3
            ],
            "step": 0.05,
            "suffix": "x"
        },
        "method": "continent_scale"
    },

Clone this wiki locally