aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-05-13 15:31:37 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-08-10 08:55:06 +0000
commite01bea8999d2f58add58874bd3e6792f509b131b (patch)
tree7acfa6aff3116b0c986bc1654a9a4c39b2db3f51 /src/quick/items
parentc1667cd7277cd48e26a97ea5d10d6bcab0ef576e (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')
-rw-r--r--src/quick/items/qquicktext.cpp10
-rw-r--r--src/quick/items/qquicktextedit.cpp11
-rw-r--r--src/quick/items/qquicktextinput.cpp10
3 files changed, 31 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.
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp
index 2887dad8ce..cf7e91ffec 100644
--- a/src/quick/items/qquicktextedit.cpp
+++ b/src/quick/items/qquicktextedit.cpp
@@ -206,6 +206,17 @@ QString QQuickTextEdit::text() const
*/
/*!
+ \qmlproperty string QtQuick::TextEdit::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::TextEdit::font.bold
Sets whether the font weight is bold.
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index b458f80ce7..31549451ab 100644
--- a/src/quick/items/qquicktextinput.cpp
+++ b/src/quick/items/qquicktextinput.cpp
@@ -229,6 +229,16 @@ QString QQuickTextInputPrivate::realText() const
*/
/*!
+ \qmlproperty string QtQuick::TextInput::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::TextInput::font.bold
Sets whether the font weight is bold.