Add row number column in model instead of vertical header
THis is because the column can be sorted but the header not.
This commit is contained in:
parent
1ab119c29a
commit
f492c8f9bc
3 changed files with 37 additions and 12 deletions
|
|
@ -51,6 +51,8 @@ public slots:
|
|||
private:
|
||||
using PKeyValues = std::vector<std::string>;
|
||||
|
||||
const int PreColumnCount = 1;
|
||||
|
||||
|
||||
class ColumnSort {
|
||||
public:
|
||||
|
|
@ -220,7 +222,7 @@ private:
|
|||
Value getLatestData(int column, int row) const;
|
||||
Value getLatestData(const QModelIndex &index) const
|
||||
{
|
||||
return getLatestData(index.column(), index.row());
|
||||
return getLatestData(index.column() - PreColumnCount, index.row());
|
||||
}
|
||||
Value getSavedData(int columnIndex, int rowIndex) const;
|
||||
Value getSavedData(const RowMapping &row_mapping, int columnIndex) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue