Hi, My previous post related to this question is here, , I reported bug also : http://www.qtcentre.org/threads/6391...ted?highlight= & Bug Report: https://bugreports.qt.io/browse/QTBUG-48725
Again : I wanted to load data with lazy population for my tree view, But lazy population (canFetchMore() & fetchMore()) doesn't works as expected, this functions are not getting called during scroll down for non root Items. (For non root items this functions are getting called only when collapse & expand not during scroll down). So some how I am finding a way to load data incrementally for non root items also.
So during a scroll I wanted to find left most last (down) tree item, with which i will find whether it has more children or not & then based this I wanted to add children (If it expanded because lazy population works for root item & top level items gets added on fly).
But I really don't have an idea How to find last element while scroll, I tried connecting to scrollBar move signal & them in a slot I tried to find last element something like, But with this approach Items are getting skipped (Not able to find last items If scroll little fast).Qt Code:
ItemAt(viewPort()->rect()->bottomLeft())To copy to clipboard, switch view to plain text mode
Then I tried doing same thing in data() function (I found this is the place where no items get skipped even If I scroll fast), here I am checking each Item (Not exactly, checking only left most items) how many children It has & based on that I am Loading few more children (Lazy population for child items). (But some how I felt this is not a good way, doing some calculations adding children in data() function).
Can somebody help me how to find out the leftmost down element when I am scrolling in view port with what ever the speed. OR any other idea how to do lazy population for children also.
Thanks a lot for reading long post :-)
Bookmarks