Subclassing QTableView to dynamically hide columns



  • Hello, I would like QTableView to react to query being reset in particular model (I would say QAbstractItemView::model().dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight), but it's not that, the model I'm interested in isn't set to view, it's behind a proxy so I would rather add a QTableView* pointer field to subclassed child of QTableView I'd be making; and also define setter such as setModel(QSqLQueryModel* qm) {m=qm;}. Question is - how do you see efficient check for whole column, can you give any sample pseudocode? Or links to doc.qt?


  • Lifetime Qt Champion

    Hi,

    Why not just connect that specific model modelReset signal to whatever slot does what you want ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.