[Interest] Design Issue with QAbstractItemModel & QTreeView
André Somers
andre at familiesomers.nl
Sat Aug 6 14:17:35 CEST 2016
You might look to QFilwSystemModel for inspiration.
André
Verstuurd vanaf mijn iPhone
> Op 4 aug. 2016 om 18:48 heeft Sébastien Le Ray <sebastien-qt at orniz.org> het volgende geschreven:
>
> Hi list,
>
> I'm currently designing an application which presents its data in a tree. I have a QAbstractItemModel making a bridge between these data and the view, so far so good.
>
> However I'm stuck when it comes to react to underlying data structure changes, specifically when rows are added and removed. Model has to react before and after the row is added, however, the only information it gets is "row added" signal. Worse, adding a row can add the row and some subitems (some objects creates mandatory children).
>
> What is the proper way to deal with this? Should I have some kind of proxy between the data and the mode?
>
> Regards
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
More information about the Interest
mailing list