QmlDesigner: Add double as dynamic property

Task-number: QDS-10439
Change-Id: I572d2fe943b187bee53a34cc4f832e6220f90d9e
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
Thomas Hartmann
2024-04-26 11:16:18 +02:00
parent ffe30a313e
commit 9b4aa051d4
2 changed files with 5 additions and 2 deletions

View File

@@ -528,6 +528,8 @@ Section {
return intEditor
if (propertyType == "real")
return realEditor
if (propertyType == "double")
return realEditor
if (propertyType == "string")
return stringEditor
if (propertyType == "bool")
@@ -708,7 +710,7 @@ Section {
StudioControls.ComboBox {
id: comboBox
actionIndicator.visible: false
model: ["int", "real", "color", "string", "bool", "url", "alias", "signal",
model: ["int", "real", "double", "color", "string", "bool", "url", "alias", "signal",
"TextureInput", "vector2d", "vector3d", "vector4d"]
width: cePopup.itemWidth
}

View File

@@ -212,7 +212,8 @@ bool isDynamicVariantPropertyType(const TypeName &type)
{
// "variant" is considered value type as it is initialized as one.
// This may need to change if we provide any kind of proper editor for it.
static const QSet<TypeName> valueTypes{"int", "real", "color", "string", "bool", "url", "var", "variant"};
static const QSet<TypeName> valueTypes{
"int", "real", "double", "color", "string", "bool", "url", "var", "variant"};
return valueTypes.contains(type);
}