aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2026-09-29 14:46:54 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2026-09-29 20:27:11 +0000
commitcd47d9179ffc90cafd4248b6e11eb9fe3a9dc2ec (patch)
tree86fc7d7252b034a9c48aab4eb665b3dfb3606734
parent4c1054b0f997f2977a54d42523856805b309db9a (diff)
StyleKitProperties: give pointSize a non-zero default size
Text elements write out a warning if the pointSize is set to 0. And when using StyleKit, this can happen if the property is evaluated before the Style and Theme has finished loading (and then it will be corrected). To avoid such a warning, return the default pointSize until the Style and Theme is ready. Pick-to: 6.12 Change-Id: I1fd5db7e350cbdc1ddcd5e1ee53db90e94941c4f Reviewed-by: Doris Verria <doris.verria@qt.io>
-rw-r--r--src/labs/stylekit/qqstylekitcontrolproperties.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/labs/stylekit/qqstylekitcontrolproperties.cpp b/src/labs/stylekit/qqstylekitcontrolproperties.cpp
index 4874300f55..66149a4f9a 100644
--- a/src/labs/stylekit/qqstylekitcontrolproperties.cpp
+++ b/src/labs/stylekit/qqstylekitcontrolproperties.cpp
@@ -1895,7 +1895,7 @@ void QQStyleKitTextProperties::setItalic(bool italic)
qreal QQStyleKitTextProperties::pointSize() const
{
- return styleProperty<qreal>(QQSK::Property::PointSize);
+ return styleProperty<qreal>(QQSK::Property::PointSize, QFont().pointSize());
}
void QQStyleKitTextProperties::setPointSize(qreal pointSize)