Hmm. QListWidget is a so called 'convenience class'. It is a QListView with it's model (a QAbstractListModel derivative) built into it. Internally, the QListWidget is definitely Model/View, but the code using it probably isn't. To make your implementation according to MVC, you would need to implement your own QAbstractItemModel derivative and feed it to a view. MVC is really about splitting up responsibilities: wherever you have to worry about displaying (view), do only displaying, wherever you have to worry about the data (model), do only data management. Using QListWidget more or less forces you in the 'wrong' i.e. non-MVC direction.
Also, using delegates is different from setting item widgets. Moreover, using delegates is probably the better course of action to take.




Reply With Quote

Bookmarks