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. ListView Section

ListView Section

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 2 Posters 536 Views 1 Watching
  • 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello how to add listview section a image ? Or how to access listview modet current item property from listview section ?

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Anyone help me ?

      ODБOïO 1 Reply Last reply
      0
      • ? A Former User

        Anyone help me ?

        ODБOïO Offline
        ODБOïO Offline
        ODБOï
        wrote on last edited by
        #3

        hi

        @NullByte said in ListView Section:

        Hello how to add listview section a image

        you can create a custom section.delegate as shown here

        https://doc.qt.io/qt-5/qml-qtquick-listview.html#section.delegate-prop

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by A Former User
          #4

          I don't know how to access listview model current image property in section area. We can use multiple property in section ?

          ListView {
              id: fixtureList
              width: parent.width
              height: parent.height - (header.height + tabBar.height) * dp
              anchors.top: header.bottom
              anchors.left: parent.left
              focus: true
              clip: true
              model: ListModel{}
              delegate: Rectangle {
                  id: dataModel
                  height: 100 * dp
          
                  Text {
                      id: matchStartTime
                      text: "22:04"
                      anchors.left: parent.left
                      anchors.leftMargin: 5
                      anchors.top: parent.top
                      anchors.topMargin: 5
          
          
          
                  }
              }
          
              section {
                  property: "name"
                  criteria: ViewSection.FullString
                  delegate: Rectangle {
                      color: "#d2d4c7"
                      width: parent.width
                      height: 50 * dp
          
                      Text {
                          text: section
                          anchors.left: parent.left
                          anchors.leftMargin: 15
                          anchors.top: parent.top
                          anchors.topMargin: 5
                          font.pixelSize: 15
                          font.family: fontRegular.name
          
                      }
                  }
          
              }
          }
          
          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