| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QQStyleKitDebug previously printed property paths under
the assumption that nested property groups followed the
same parent–child hierarchy as they are written in the style.
After a recent optimization in QQStyleKitPropertyGroup, this
assumption is no longer valid.
As part of that optimization, all property groups now have
the root QQStyleKitControlProperties as their parent in order
to avoid unnecessary hierarchy traversals. This change broke
the logic used to reconstruct property paths for debugging.
This patch introduces QQStyleKitPropertyGroup::pathToString(),
which reconstructs a property path in the same order as it is
written in the style. While this functionality may also enable
future optimizations, it is currently used to restore correct
and readable debug output.
Task-number: QTBUG-130067
Pick-to: 6.11
Change-Id: I60e0aac3320c703b5b0995daa5a68a8ea1f015c5
Reviewed-by: Doris Verria <doris.verria@qt.io>
|
|
|
This patch introduces a new styling API for Controls called
StyleKit. StyleKit provides a higher-level, key–value–based
approach to styling applications, serving as an alternative
to working directly with the lower-level Templates API.
The primary goal of StyleKit is to offer a unified API for
styling both Controls and Widgets. The current Templates-based
approach relies heavily on JavaScript, which makes it unsuitable
for use with Widgets. This initial version supports Controls
only; support for Widgets will be added in a future update.
StyleKit is designed to make it easier for designers and UI
developers to:
- Focus on visual styling rather than Template logic (such as
geometry, delegate positioning, and handle placement).
- Allow style properties to propagate, enabling you to factor
out common styling into shared control types and override only
what differs in the more specific control types.
- Style controls independently in each of their states, without
needing nested ternary expressions to check state.
- Define and apply multiple themes with minimal effort.
- Provide different style variations depending on context.
For example, styling a Switch differently when it appears
inside a ToolBar.
[ChangeLog][Qt labs] Introduced new QML module 'StyleKit'.
StyleKit provides a flexible styling framework for Qt Quick
Controls, enabling developers to define reusable styles and
themes using a simple key-value property format.
Change-Id: Iae25324486aea7a7b9b2ce52135327ec7e9b6f59
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|