Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to append new elements at the top of ListView



  • By default when an element is appended to the ListView, it goes to the bottom of the list. Is there any easy way to do the opposite?
    I've tried this example http://qt-project.org/wiki/How_to_make_QML_ListView_align_bottom-to-top and it works but scrolling the list with a mouse is mirrored. When I scroll up, the list moves down.
    Maybe there's a method to change that?



  • I personally would use insert on ListView's model to insert in beginning and ListView's method positionViewAtBeginning() (I have not tested if that works but it should). That example you have pointed at is not very good way to do in my opinion but that should work as well.


Log in to reply