feat: add combobox component
This commit is contained in:
@@ -80,5 +80,18 @@ AppWindow {
|
||||
buttons: MessageDialog.Ok
|
||||
text: "The document has been modified."
|
||||
}
|
||||
|
||||
AppComboBox {
|
||||
model: ListModel {
|
||||
id: model
|
||||
ListElement { text: "Banana" }
|
||||
ListElement { text: "Apple" }
|
||||
ListElement { text: "Coconut" }
|
||||
}
|
||||
onAccepted: {
|
||||
if (find(editText) === -1)
|
||||
model.append({text: editText})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user