I'm slowly getting used to using the Qt4 GUI. In the project I'm working on, I need to be able to add / edit / delete Team objects in the list. Based on the perspective of C # .NET, I would do something like
List<Team> teams = new List<Team>(); teamsListBox.DataSource = teams; teamsListBox.DisplayMember = "Name";
Then use the buttons on the form to add / remove / edit.
But, from what I can say, in Qt there is no easy way to do this. I looked through the documentation for QListView, QListWidget, QStandardItemModel, etc., but I can't figure out how to get the equivalent Qt code for C #.
My goal is to show Team in some list, and then add / remove / edit Team under it at runtime.
How do you do this?
source share