QTableWidget populating
-
[quote author="VCsala" date="1292523877"]AFAIK QTableWidget inherits QTableView[/quote]
Indeed it does. You can consider the QWidget classes to be exactly like the QView classes, but with a builtin model (which closely resembles QStandardItemModel) and helper classes to manage this models (the QWidgetItem classes). Using a custom model with the QWidget classes is pointless, since you won't be able to use their helper classes to manage the model.
[quote author="VCsala" date="1292521276"]You should build a model inherited from QAbstractTableModel and set it as a basemodel for the QTableWidget.[/quote]
s/QTableWidget/QTableView/, see above.
-
-
The decision is not so easy. We use both the QxxWidgets and the QxxViews in our code. Sometimes it's more convenient to have a QxxWidgetItem subclass to add the functionality, especially if you only want to add a small improvement and are satisfied with the standard implementation for the rest. Although I must admit that we generally do not have big amounts of data in the Widgets, so speed and space optimization is not a big issue for us.
-