标题:求助。。。ListView ListModel怎么能放外部变量
作者:hh_mm
日期:2015-01-04 17:03
内容:
qml
用c++读取变量a的值,传到qml中,怎么能在ListModel中存放,然后现实在我界面上。
如例程中的:
ListModel {
ListElement {
title: "Pancakes"
picture: "content/pics/pancakes.jpg"
ingredients: "
。。。
}
现实在界面中是
其中的 title: "Pancakes",可以是从c++中传进来的( viewer.rootContext() -> setContextProperty("title", sdomInfo.title.c_str());)title的变量值吗?