What should be the section.property string when using Qml ContactsModel
-
wrote on 2 Mar 2012, 09:55 last edited by
My code is like this ,
what should be the section.property when using Qml ContactsModel?I do not see the section showing up anything here.
Also, Is it possible to copy the ContactsModel to ListModel? If so, how?
@ListView{
id:listContact
focus:true;clip:true
anchors.fill: parent
model:contactModel.contactsdelegate: contactDelegate section{ property: "name.firstName" criteria: ViewSection.FirstCharacter delegate: Rectangle{ x:200;y:300 width:parent.width-40; height:40 color:"#00808080" visible: listContact.moving Text{ anchors.centerIn: parent font{pixelSize: 44; bold:true} text:section } } } ScrollDecorator{ flickableItem: listContact } }@
-
wrote on 17 Mar 2012, 11:38 last edited by
I also would like to know how to use sections with QtMobility's QML ContactModel. Has anyone any idea? Sections show up just fine when I use custom ListModel, but I can't figure out how to use sections with ContactModel.