我有一个问题,我找不到它的解决方案,我希望你在这里找到它:我做了一个ListView与它的模型及其委托等等,像这样:
Item {
id: creation; width: parent.width ; height: parent.height
.....
ListView {
id: mainViewLiist
model: CreationModel {id: modelCreation}
delegate: delegateCreation
width: parent.width; height: parent.height; x: -(screen.width * 1.5);
cacheBuffer: 100;
}
}
Run Code Online (Sandbox Code Playgroud)
委托包括Text,TextEdit等....这样的事情:
Component {
id: creationDelegate
Item {
id: itemCreate
....
Row {
id: rowSerie
spacing: 5
Text {
id: seriesLabel
text: "Series:"
....
}
TextEdit {
id: seriesTextEdit
text: ""
....
}
}
....
}
....
}
Run Code Online (Sandbox Code Playgroud)
在同一个项目"创建"中,还有一个带有两个按钮的工具栏,如下所示:
ToolBar { id: toolBarCreation; height: 40;
width: parent.width;
opacity: …
Run Code Online (Sandbox Code Playgroud)