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. Resizing delegates in a ListView
Qt 6.11 is out! See what's new in the release blog

Resizing delegates in a ListView

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 246 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.
  • M Offline
    M Offline
    Michel de Boer
    wrote on last edited by
    #1

    I have created a social media app with Qt/QML that runs on Android. I use a ListView to display a timeline of posts. The height for the posts is not always known at the creation of the ListView delegate. E.g. a post may have an image that get asynchronously loaded. The height will change when the image comes in.
    When the height of a delegate increases by N pixels, then the delegates below are pushed down N pixels.
    This is fine for delegates below the visible area of the ListView. For delegate above the visible area it is not, as the visible are moves.
    I want the visible area to be stable, i.e. for delegate above the visible area, I want an increase in height to cause all delegate above the increasing one to be moved up!
    Is that possible?

    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