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. QML: ListView vs Column. When the best solution?
Forum Updated to NodeBB v4.3 + New Features

QML: ListView vs Column. When the best solution?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
5 Posts 4 Posters 1.3k 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.
  • B Offline
    B Offline
    bogong
    wrote on 14 Jun 2020, 16:38 last edited by
    #1

    Hello!
    I've got question - when the best to use ListView and when the best to use Column?
    Sugestions?

    O R 2 Replies Last reply 15 Jun 2020, 22:49
    1
    • B bogong
      14 Jun 2020, 16:38

      Hello!
      I've got question - when the best to use ListView and when the best to use Column?
      Sugestions?

      O Offline
      O Offline
      ODБOï
      wrote on 15 Jun 2020, 22:49 last edited by ODБOï
      #2

      @bogong hi
      there is not really a best, it depends on your usecase / what you want to achieve
      Column is a QML Positioner it will show visual items inside it in a vertical column
      ListView description here https://doc.qt.io/qt-5/qml-qtquick-listview.html#details

       ListView {
              id: view
              height: 100
              width: parent.width
              orientation: Qt.Horizontal
      
              model: [0,1,1,2,3,5,8,13,21,34] // values to show
      
              delegate:
                  Column{ // showing in column
                  width: 80
                  height : 100
                  Text { // a label
                      id: label
                      height:50
                      text: "value ° " + index
                  }
      
                  Text { // the value from the model
                      text: modelData
                      height: 50
                      font.pixelSize: 12
                      color: "blue"
                  }
              }
          }
      
      1 Reply Last reply
      2
      • B Offline
        B Offline
        bogong
        wrote on 23 Jun 2020, 09:34 last edited by
        #3

        Solution found https://youtu.be/oslnmLQ5Zh8 explained in 4 first minutes when the best to use ListView vs Column with repeater. Issue closed.

        1 Reply Last reply
        1
        • B bogong
          14 Jun 2020, 16:38

          Hello!
          I've got question - when the best to use ListView and when the best to use Column?
          Sugestions?

          R Offline
          R Offline
          RokeJulianLockhart
          wrote on 1 May 2023, 00:05 last edited by
          #4

          @bogong, Column as in ColumnLayout?

          When using a forum, remember to tag the person you are responding to, in case they are not subscribed to the thread.

          G 1 Reply Last reply 1 May 2023, 11:43
          0
          • R RokeJulianLockhart
            1 May 2023, 00:05

            @bogong, Column as in ColumnLayout?

            G Offline
            G Offline
            GrecKo
            Qt Champions 2018
            wrote on 1 May 2023, 11:43 last edited by
            #5

            @BEEDELL-ROKE-JULIAN-LOCKHART Please stop reviving old threads. Also Column as in Column.

            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