How to implement selectable treeview folder
-
Hello all, I would like to implment the UI like the following image.
it look like window folder but the data is not really from file system.
it has selectable checkbox which and make sub child select together or unselected.
it has like connection between items.how to implment it ? is there any good sample or similar component like this ?
![alt text]( image url)
-
It depends on which version of Qt you are using. If you are using 5.x, you can use the
TreeView
component. The main problem with this is that it is from QML Controls 1 which is deprecated, and a replacement has never been implemented in the current Controls 2.Qt have recently started offering a modern tree view control as a paid add-on, but I believe it is only compatible with the most recent 5.x releases, and not yet with 6.x at all.
BTW, the above assumed you want to use QML as you have posted in this area, but if you are just starting out it might be worth considering using Qt Widgets if you are creating a traditional desktop-style UI with heavy use of tree controls and so on.