forked from qt-creator/qt-creator
QmlDesigner: Allow to add a signal
Change-Id: Ib34cb19c9a046d8a404c5be06099280f29686662 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
This commit is contained in:
@@ -708,7 +708,7 @@ Section {
|
|||||||
StudioControls.ComboBox {
|
StudioControls.ComboBox {
|
||||||
id: comboBox
|
id: comboBox
|
||||||
actionIndicator.visible: false
|
actionIndicator.visible: false
|
||||||
model: ["int", "real", "color", "string", "bool", "url", "alias",
|
model: ["int", "real", "color", "string", "bool", "url", "alias", "signal",
|
||||||
"TextureInput", "vector2d", "vector3d", "vector4d"]
|
"TextureInput", "vector2d", "vector3d", "vector4d"]
|
||||||
width: cePopup.itemWidth
|
width: cePopup.itemWidth
|
||||||
}
|
}
|
||||||
|
@@ -167,6 +167,10 @@ void DynamicPropertiesProxyModel::createProperty(const QString &name, const QStr
|
|||||||
QVariant value = defaultValueForType(typeName);
|
QVariant value = defaultValueForType(typeName);
|
||||||
VariantProperty variantProp = modelNode.variantProperty(name.toUtf8());
|
VariantProperty variantProp = modelNode.variantProperty(name.toUtf8());
|
||||||
variantProp.setDynamicTypeNameAndValue(typeName, value);
|
variantProp.setDynamicTypeNameAndValue(typeName, value);
|
||||||
|
} else if (type == "signal") {
|
||||||
|
SignalDeclarationProperty signalDeclarationProperty
|
||||||
|
= modelNode.signalDeclarationProperty(name.toUtf8());
|
||||||
|
signalDeclarationProperty.setSignature("()");
|
||||||
} else {
|
} else {
|
||||||
QString expression = defaultExpressionForType(typeName);
|
QString expression = defaultExpressionForType(typeName);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user