Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
One ItemModel with two different Item views which have different coloumn count
DonCoder last edited by DonCoder
I have designed a QAbstractItemModel with coloumn count N.
But there are two different views say ViewA and ViewB are using this model.
ViewA and ViewB are QTableViews and Model is QAbstractItemModel
ViewA should display M columns (where M < N). and ViewB should display N columns.
So how can i handle this. What are the apis i am supposed to handle at the levels of views. Mostly i do not wanted to disturb my Model class, this should be generic. Any Suggestions plz.
Hide the columns in the second view.