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 Sections
Qt 6.11 is out! See what's new in the release blog

ListView Sections

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 1.2k 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.
  • E Offline
    E Offline
    error09
    wrote on last edited by
    #1

    Hi,

    How can i create view like in Mac Spotlight ?

    !http://http://imageshack.com/a/img691/3554/305r.png()!

    Section on left.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mysite1920
      wrote on last edited by
      #2

      Url error

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mysite1920
        wrote on last edited by
        #3

        Ok, You have to use QtQuick ListView type for list in that order and Image type of placing image before the list.
        Here's the general code:
        @Rectangle {

        ListModel {
        id : newModel
        ListElement {name: "TextMate"}
        ListElement {name: "TextMate"}
        ListElement {name: "Activity Monitor"}
        }
        Component {
        id: newDelegate
        Text {
        // Define text property
        }
        }

        ListView {

        model: newModel
        delegate: newDelegate // It refers to delegate above
        width: parent.width
        height: parent.height

        }

        }@

        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