[Solved] Edit an AbstractListModel with a QFileDialog
-
[Sorry, I accidentally overrode this question, and do not see a way to rollback].
The original question was trying to set model data on the click event of a view. The solution was simple, and is demonstrated here:
http://programmingexamples.net/wiki/Qt/ModelView/AbstractListModelFileDialog -
In method AbstractListModel::setData() you should store the supplied value somewhere. You do nothing with it.
-
Volker, thanks, I see. I'll get used to using models sooner or later... :)
-
You're welcome. Keep in mind, that you are completely responsible of managing the data storage. QAbstractItemModel just provides the interface for a standardized way of accessing and setting the data, the implementation is solely up to you.