On this page

C

QUL_GLYPHS_LAYOUT_CACHE_EXHAUSTION_POLICY

Description

Controls what happens when a text is too large for the glyph layout cache to lay out, even after the cache has been emptied for it:

  • RenderNothing (the default): the text is not rendered and a throttled sizing hint is logged, so the rest of the UI keeps running. Layout is retried on later updates, so the text renders again once it is small enough to fit the cache; for example if its content changes to a shorter string, or its layout settings change, such as a smaller font size. Freeing other cached text does not help, as the layout is already retried against an emptied cache.
  • Halt: the cache being too small is raised as an error via QUL_ASSERT (routed to the platform error handler). Use this to fail fast during development rather than silently dropping text.

This only affects a text that does not fit an otherwise-empty cache, which is a sizing error rather than a runtime condition. Size the cache so it never occurs; see QUL_GLYPHS_LAYOUT_CACHE_SIZE.

Example

set_target_properties(<Executable Target> PROPERTIES
    QUL_GLYPHS_LAYOUT_CACHE_EXHAUSTION_POLICY "Halt"
)

See also Text caching and QUL_GLYPHS_LAYOUT_CACHE_SIZE.

Available under certain Qt licenses.
Find out more.