Hi Dear,
I have a tableView on my form, that contain data from database.
I want to group data and show grouped data in a treeView, but i don't know how to do it !!
Is there anybody help me ?
Thanks a lot...
Hi Dear,
I have a tableView on my form, that contain data from database.
I want to group data and show grouped data in a treeView, but i don't know how to do it !!
Is there anybody help me ?
Thanks a lot...
Qt does not provide any built-in methods for aggregating data. Therefore you need to execute an sql query that will return aggregated data and build the tree model from it by yourself. If you sort incoming data by groups, then while iterating the result set, you can check whether the group of the current record is the same as that from the previous record and build your nodes based on that.
Thank you...
but i get data from database by query and don't have problem with it, i only don't know how do group data and put grouped data in QtreeView.
I searched and found that could use of QAbstractitemmodel & QTreeView for grouping data !! but i don't know how !!?
do you know how do i can use them ?
thanks...
thank you very much for replies,
If it's possible please explain to me more about it, i'm beginner with Qt so i'm don't know how do it !!
Best regards...
What is the part that you don't know how to implement?
Bookmarks