Added default invalid parentIndex to TableModel::columnCount and added Q_UNUSED macro to suppress warnings.

This commit is contained in:
2025-12-08 13:33:05 +01:00
parent 4c906099eb
commit d45b1098f9
2 changed files with 9 additions and 3 deletions

View File

@ -21,7 +21,7 @@ class TableModel : public QAbstractTableModel {
QHash<int, QByteArray> roleNames() const override;
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
int columnCount(const QModelIndex& parent) const override;
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
QVariant data(const QModelIndex& index, int role) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;