[ui] Add PushButton component to AttributeItemDelegate

This commit is contained in:
Aurore LAFAURIE 2024-04-24 15:29:45 +02:00
parent eb1a0faf97
commit c5f440b8a8

View file

@ -179,6 +179,8 @@ RowLayout {
sourceComponent: {
switch (attribute.type) {
case "PushButtonParam":
return pushButton_component
case "ChoiceParam":
return attribute.desc.exclusive ? comboBox_component : multiChoice_component
case "IntParam": return slider_component
@ -203,6 +205,17 @@ RowLayout {
}
}
Component {
id: pushButton_component
Button {
text: attribute.desc.label
enabled: root.editable
onClicked: {
attribute.clicked()
}
}
}
Component {
id: textField_component
TextField {