From e01bea8999d2f58add58874bd3e6792f509b131b Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 13 May 2015 15:31:37 +0200 Subject: 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 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/quick/items/qquicktext.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/quick/items/qquicktext.cpp') 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 @@ -1443,6 +1443,16 @@ QQuickText::~QQuickText() If the family isn't available a family will be set using the font matching algorithm. */ +/*! + \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 -- cgit v1.2.3