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 with flow layout
Forum Updated to NodeBB v4.3 + New Features

ListView with flow layout

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 1 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.
  • O Offline
    O Offline
    ondrejandrej
    wrote on 18 Dec 2014, 17:18 last edited by
    #1

    What is currently the best way to make ListView with flow layout? (Qt 5.3.X)
    Is it possible to achieve it by some particular setting of orientation and layoutDirection?

    I know that I could achieve this without ListView with Repeater:
    @Flow {
    Repeater {
    model: myModel
    MyDelegate {
    }
    }
    }@

    But I will have potentially big amount of items, so ListView seems a better idea.
    BTW my model subclasses QAbstractListModel.

    1 Reply Last reply
    0
    • O Offline
      O Offline
      ondrejandrej
      wrote on 19 Dec 2014, 16:01 last edited by
      #2

      It seems that I have to answer myself.

      What I want can be done with GridView with default property values. I'm just not yet sure if this is efficient.

      1 Reply Last reply
      0
      • O Offline
        O Offline
        ondrejandrej
        wrote on 19 Dec 2014, 16:23 last edited by
        #3

        So I'm trying this in a GridView, where I show previews of photos (Image element in delegate). I'm testing on a set of 433 photos. My test application with GridView consumes 1.5 GB directly after start.

        Which is weird, because QAbstractItemModel::data() in my model is called only for a couple of first items after start (then again when GridView is scrolled).

        1 Reply Last reply
        0
        • A Alouette referenced this topic on 20 May 2025, 01:06

        1/3

        18 Dec 2014, 17:18

        • Login

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