Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. What should be the section.property string when using Qml ContactsModel
Forum Update on Monday, May 27th 2025

What should be the section.property string when using Qml ContactsModel

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tapadar
    wrote on 2 Mar 2012, 09:55 last edited by
    #1

    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.contacts

                delegate: 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
                }
            }@
    
    1 Reply Last reply
    0
    • M Offline
      M Offline
      miksuh
      wrote on 17 Mar 2012, 11:38 last edited by
      #2

      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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved