Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is how I call the append
- // macroItemModel.append({macroName: macroNameInput.textInputValue, macroCode: mainKeyInput.textInputValue + "->" + inputCodeCombined})
- ListModel {
- id: macroItemModel
- //ListElement { macroName: "Unnamed Macro" }
- }
- Column {
- id: macroItemColumn
- //anchors { left: yourMacrosText.left; top: yourMacrosText.bottom; leftMargin: 12; topMargin: 12 }
- width: 130
- spacing: 4
- anchors.top: parent.top
- anchors.topMargin: 54
- Repeater {
- model: macroItemModel
- delegate: MacroItem {
- required property int index
- containerWidth: macroListContainer.width/1.5
- macroName: model.macroName
- macroCode: model.macroCode
- // macroItemModel.get(index).macroCode
- onDeleteButtonClicked: {
- macroItemModel.remove(index, 1);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment