diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2016-03-04 12:13:09 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2020-01-21 07:27:49 +0100 |
commit | a43a0cf5e626c08868951096b8549d804192f79e (patch) | |
tree | 2002245ee344c9dd077e99152a7f3016427b562f /tests/auto/qml/qqmlvaluetypes/data | |
parent | 15ea475b40f6ad28d46e5cbd65a1ccc8556a53df (diff) |
Make Font.weight an integer instead of enumeration
The weight in QFont is an integer, allowing you to request a font
of any weight given the predefined scale. In Qt Quick, however, you
were limited to the predefined values.
This is done in Qt 6 because it breaks conversions from string to
weight, as the change in the autotest illustrates.
[ChangeLog][Font] Made Font.weight an integer value rather than limit
it to a predefined set of weights. As a side effect, conversion from
strings to font weights are no longer supported.
Fixes: QTBUG-80402
Change-Id: Ifbe9a0e608b63bfa93bb54999b0b3c1851ccfa88
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlvaluetypes/data')
-rw-r--r-- | tests/auto/qml/qqmlvaluetypes/data/font_write.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlvaluetypes/data/font_write.qml b/tests/auto/qml/qqmlvaluetypes/data/font_write.qml index ff4d0a1004..4d3ae32025 100644 --- a/tests/auto/qml/qqmlvaluetypes/data/font_write.qml +++ b/tests/auto/qml/qqmlvaluetypes/data/font_write.qml @@ -3,7 +3,7 @@ import Test 1.0 MyTypeObject { font.family: if(1) "Helvetica" font.bold: if(1) false - font.weight: "Normal" + font.weight: 50 font.italic: if(1) false font.underline: if(1) false font.overline: if(1) false |