Data
Declares a data source.Data renders nothing; it only fetches/reads data.
Signature
Attributes
Data shape
Access
- Named source:
{Data.News.Title}or{News.Title} - Default source (Name=Data):
{Data.Title} - Per-source status:
{Data.Status.News}=Loading/Completed/Error - At most 8 data sources.
Local paths
- Absolute paths are used as-is.
- Relative paths: for a locally imported widget the base is the
.qwidgetdirectory; for a widget imported by URL the base is the launcher data directory. - The editor info panel shows the resolved absolute path.
Caching
- The cache is reused for
Refreshseconds;0means refresh on every mount. - Dynamic URL/Path containing
{Inputs.*}bypasses the cache and refetches when inputs change. - Non-binary data is cached in localStorage; binary data is cached in memory only.
- The
Refreshaction refetches expired data sources.
Example
Gotchas
Url/Pathsupport{Inputs.*}; the resolved URL must still be https:443 on an approved host. Parameterize query values or path segments, not the host.- Input changes cancel the old request and refetch; dynamic sources are not cached.
- Online requests require an approved domain; non-https:443 and private-network addresses are rejected.
- Text/JSON/XML are limited to 1MB, binary to 8MB.