You can use either QTreeWidget, QTableWidget, QTreeView+QStandardItemModel, QTableView+QStandardItemModel, QTreeView+QAbstactTableModel subclass, QTableView+QAbstactTableModel subclass for what you are trying to do.
I would go with a QT*View+QStandardItemModel (tree or table doesn't matter).
The functionalities you describe are:
only some columns will be editable
Entering a value in the cents column (a logarithmic measure of frequency) will change the value in the hertz column, and vice versa
connect a slot to QStandardItemModel::dataChanged signal
There will be a button next to the table to add an additional note to the scale
connect a slot that calls QStandardItemModel::insertRows to the QPushButton::clicked signal
In 90% of the cases you can use QStandardItemModel instead of going through the minefield that is subclassing an abstract model.
My advice is just to use that "universal model" instead of a custom one. If you really, really want to customise it as performance of QStandardItemModel is a problem then make sure you run your model through the Model Test (needs just a couple of trivial fixes to work on Qt5) that will tell you if you did everything as you were supposed to or you fell in the countless pitfalls of model subclassing
Hi, thanks for the reply. Yes, I set that flag to true but I can select a row by clicking indivual cell or horizontal header. I've overriden flags function in my model if I remove isSelectable flag i can't select anything.