diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-05-13 15:31:37 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-08-10 08:55:06 +0000 |
commit | e01bea8999d2f58add58874bd3e6792f509b131b (patch) | |
tree | 7acfa6aff3116b0c986bc1654a9a4c39b2db3f51 /src/quick/items/qquicktext.cpp | |
parent | c1667cd7277cd48e26a97ea5d10d6bcab0ef576e (diff) |
Font matching by font stylename
Some fonts may have styles that does not directly match to QFont
properties. To support those QFontDatabase supports matching by style
name. This patch exposes that to QML.
Change-Id: I9896f2e3d9f6b56fb51f5694b018b456bcd05ed6
Task-number: QTBUG-30851
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquicktext.cpp')
-rw-r--r-- | src/quick/items/qquicktext.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp index 2475d19c8d..a91e6b47c2 100644 --- a/src/quick/items/qquicktext.cpp +++ b/src/quick/items/qquicktext.cpp @@ -1444,6 +1444,16 @@ QQuickText::~QQuickText() */ /*! + \qmlproperty string QtQuick::Text::font.styleName + \since 5.6 + + Sets the style name of the font. + + The style name is case insensitive. If set, the font will be matched against style name instead + of the font properties \l weight, \l bold and \l italic. +*/ + +/*! \qmlproperty bool QtQuick::Text::font.bold Sets whether the font weight is bold. |