Hi, I am developing a preferences/settings framework using Qt model/view framework. My data structure is a tree containing various preferences. The various configuration "pages" are branches nodes, and each configuration items are leaf nodes.
The first visual representation of this framework is done with a QListView: I represent each "page" by setting setRootIndex() to the proper node. This works well. Visual representation is done using a custom delegate (the result is quite similar to Android's preferences menus). I also need a lightweight, configurable, item-based representation of the same data stored in the model (editable as well via another deleate). The display of this view is done in the main window, and could be implemented for now as (sort of) a QTableView of 1 row height and each column element is a preference element. My concern actually is that I need to display non-adjacent preferences in that table. Let's say my data model is: Root | +- Config1 | | | +- A | +- B | +- Config2 | +- C +- D I may want to display in the MainWindow view: [D][A] I was wondering what would be the most efficient approach here: - Custom model for the second view that is based on the same underlying data model (how the 2 models are informed that the same data has changed underneath?) - Custom proxy model to re-arrange elements (?) - QDataWidgetMapper (?) - Anything else? Any help would be appreciated! Thanks, Pierre-Étienne Messier
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest