diff -r 7486347f73cf -r 6c86efe60b37 ui/qt/model.h --- a/ui/qt/model.h Tue Apr 22 20:40:01 2025 +0200 +++ b/ui/qt/model.h Thu Apr 24 21:19:29 2025 +0200 @@ -74,7 +74,7 @@ class TableModel : public QAbstractListModel { Q_OBJECT - ui_getvaluefunc getvalue; + UiModel *model; ui_callback onactivate; void *onactivatedata; ui_callback onselection; @@ -85,7 +85,7 @@ UiVar *var; QTreeView *view; - TableModel(UiObject *obj, QTreeView *view, UiVar *var, ui_getvaluefunc getvalue); + TableModel(UiObject *obj, QTreeView *view, UiVar *var, UiModel *model); void setActivationCallback(ui_callback f, void *userdata); void setSelectionCallback(ui_callback f, void *userdata); @@ -93,7 +93,9 @@ void update(int row); int rowCount(const QModelIndex &parent = QModelIndex()) const; + int columnCount(const QModelIndex &parent = QModelIndex()) const; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + QVariant headerData(int section, Qt::Orientation orientation, int role) const; public slots: void selectionChanged(