PDA

View Full Version : Stringlist model plugin in qml



songthanjp
25th April 2011, 10:00
Hi all.

Actually in qml has Listmodel item, but some customize always attract me. so I 'm now trying write simple list model plugin in qml.
good begin examples in java2s.com (http://www.java2s.com/Code/Cpp/Qt/stringlistmodelexample.htm). Because i write a plugin so i replaced main.cpp by a test qml file and add function append(QString string) in stringlistmodel file. My purpose is when click on black button in qml file will be add an item in list view. (list view use stringlistmodel). Unfortunately it could be add data to this model, but could not display any item on ListView.
I attach my example here. any one could help my to solve this problem.
Thank in advance!

wysota
25th April 2011, 12:14
You are aware there is a QStringListModel class, right?