QmlDesigner: Adding support for font weight

We have to tell the rewriter that an enum scope called "Font"
does exist.

Change-Id: Ib77a099d94ec84b99e54e3c9151249df53eb53fa
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2016-10-12 11:35:32 +02:00
committed by Tim Jenssen
parent 5d5c4aa9cc
commit b0d5887638
2 changed files with 13 additions and 1 deletions

View File

@@ -142,6 +142,18 @@ Section {
}
Label {
text: qsTr("Font weight")
toolTip: qsTr("Sets the font's weight.")
}
ComboBox {
Layout.fillWidth: true
backendValue: backendValues.font_weight
model: ["Normal", "Light", "ExtraLight", "Thin", "Medium", "DemiBold", "Bold", "ExtraBold", "Black"]
scope: "Font"
}
Label {
visible: showStyle
text: qsTr("Style")

View File

@@ -90,7 +90,7 @@ static inline QStringList globalQtEnums()
static inline QStringList knownEnumScopes()
{
static const QStringList list = {
"TextInput", "TextEdit", "Material", "Universal"
"TextInput", "TextEdit", "Material", "Universal", "Font"
};
return list;
}