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 infinite list on adding/removing data from top/bottom
Forum Updated to NodeBB v4.3 + New Features

ListView infinite list on adding/removing data from top/bottom

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 169 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.
  • K Offline
    K Offline
    kernel panic
    wrote on last edited by kernel panic
    #1

    Hi
    I'm trying to implement an infinite feed line in ListView

    i keep active part of a chat in list by beginInsertRows/beginRemoveRows and adding/removing data from source, and it almost works - except it sticks to the bottom - if I scroll too fast

    (when I scroll slowly - new data arrives and the scroll moves near the center and that's totally as expected, this way it's truly can be infinite)

    If it's stuck at the bottom - even when new data is added, it stays at the bottom (which leaves no space for next try)

    When I scroll to top - no problems and it works beautifully as expected
    I am using:

    verticalLayoutDirection: ListView.BottomToTop
    

    fine

    Screenshot 2022-07-07 at 21.00.40.png

    fine

    Screenshot 2022-07-07 at 21.00.03.png

    stuck and it's staying there even when new data keep going

    Screenshot 2022-07-07 at 21.00.56.png

    Also i tried to handle this problem in: onRowsInserted
    and did:

    messagesList.positionViewAtIndex(last, ListView.Visible)
    

    But even if it partially can solve the problem - it appears as flickering and is weird visually

    Is there any way how to keep Discord like behavior on ListVIew?

    i leave full video in discord

    I found a similar problem but it seems dead now

    Update: i found a temporary solution - just to keep some space and not drop completely to the bottom
    But still look for a better way

    Update: it's all wrong
    Decided to move on Flutter

    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