I already posted an implementation of a QML TreeView some time ago. In the meantime I reworked this implementation, improved data and selection handling (the TreeView now comes e.g. with currentItem and currentIndex properties), added some (hopefully useful) comments, and added functionality for reordering the items in the single ListViews. The following screenshots show what it looks like now:
In this current implementation I disabled the swipe gesture for navigating the tree. Instead you can use the icons to the right of each element to go to the next level in the tree. Use the button at the very right in the menu bar to go back up in the tree.
If you want to use the swipe gesture for navigating the tree you can enable this feature simply by setting the “interactive:” property of the Flickable in TreeView.qml to “true”. Note that there is some strange issue at the moment when using swipes for navigating the tree. When moving back up in the tree via the swipe gesture selecting entries in the displayed list does not work correctly for a time of about 0.8 – 1 seconds.
I also changed the license for the TreeView code. The TreeView and its components are now additionally licensed under the terms of the GNU Lesser General Public License (LGPL). Please see the source code for more details on licensing and the like. I uploaded the source code as well as an installable version of my project (Q To-Do) for which I developed the TreeView initially. Please note that Q To-Do (a Qt/QML port of To-Do-O) is still in development.