我想在一列中显示静态数据,如数据标题,在第二列显示来自c ++部分程序的动态填充数据。我想从qt c ++部分发送动态数据作为QStringList。数据来自sql数据库,我只需要第一列的静态标题和第二列的数据。有什么想法吗?
[编辑]
我从Q ++传递了QStringList,其中包含动态填充的数据和QML中的Listmodel,其名称描述了QStringList的每个值。我想在一个QML TableView中显示这两个列表。我想在ListModel中将它们合并为
ListElement {
title: "Part material"
data: handlecombo.stringmodel4x.at(1).toString}
ListElement {
title: "Part dimension"
data: handlecombo.stringmodel4x.at(2).toString}
但是我不能在listmodel中使用脚本