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 {
|
||||
id: comboBox
|
||||
actionIndicator.visible: false
|
||||
model: ["int", "real", "color", "string", "bool", "url", "alias",
|
||||
model: ["int", "real", "color", "string", "bool", "url", "alias", "signal",
|
||||
"TextureInput", "vector2d", "vector3d", "vector4d"]
|
||||
width: cePopup.itemWidth
|
||||
}
|
||||
|
@@ -167,6 +167,10 @@ void DynamicPropertiesProxyModel::createProperty(const QString &name, const QStr
|
||||
QVariant value = defaultValueForType(typeName);
|
||||
VariantProperty variantProp = modelNode.variantProperty(name.toUtf8());
|
||||
variantProp.setDynamicTypeNameAndValue(typeName, value);
|
||||
} else if (type == "signal") {
|
||||
SignalDeclarationProperty signalDeclarationProperty
|
||||
= modelNode.signalDeclarationProperty(name.toUtf8());
|
||||
signalDeclarationProperty.setSignature("()");
|
||||
} else {
|
||||
QString expression = defaultExpressionForType(typeName);
|
||||
|
||||
|
Reference in New Issue
Block a user