Skip to main content

Widget.Using

Embeds another QWidget into the current widget as a node.

Signature

Attributes

Name and Url are mutually exclusive; the value can also be written as the tag body.

Content

Widget.Using adds no extra container of its own; the child renders in place. The parent decides the outer size.

As a pure data source

A widget can have no layout or visual nodes at all and contain only Data, Resources, Function, Widget.Inputs, Widget.Outputs, and Triggers. When embedded with Widget.Using, it renders nothing but still fetches data and runs triggers/functions.

Input contract

The parent passes values through Widget.Using.Arguments:
  • Unknown keys, type mismatches, and missing required inputs show an error placeholder.
  • Changing Arguments updates child Inputs; child input controls can still change their own values.
  • Widgets without Widget.Inputs keep the legacy behavior: Arguments go straight into Inputs.

Output contract

When Widget.Outputs is declared, only declared outputs are exposed to the parent; Children.<As>.Data and Results are no longer exposed, forming an output whitelist. Widgets without Widget.Outputs keep exposing the legacy full snapshot.

Full example

Data.Url / Data.Path support {Inputs.*}. When inputs change, the old request is canceled and data is fetched again. The resolved URL must still be https:443 on a confirmed host; parameterize query values or path segments, not the host. Pure data sources still count toward nesting depth, instance count, and data-source limits.

Scope

The parent can only read:
Children.<As>.State.Loading / .Error are available too. Without Widget.Outputs, .Data / .Results are also exposed; with declared outputs, only .Outputs is exposed.

Resolution

  • Local Name: exact match against the custom widget list; a missing or duplicated name shows an error placeholder.
  • Remote Url: fetched through the backend proxy, silently refreshed every 6 hours.
  • Export does not inline dependencies; missing local widgets are reported before export.

Limits

  • Depth ≤5; self-references and A→B→A cycles are detected.
  • At most 20 instances per parent widget.
  • Duplicate aliases fail to parse.
  • When the child unmounts, timers, script sandboxes, and blob URLs are cleaned up.

Example

Gotchas

  • Name is the display name, not the file name.
  • Children have their own Inputs/Data/Results; the parent cannot write them.
  • Remote child data domains are approved in the parent widget’s editor.