diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-12-31 23:36:14 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-02 15:38:18 +0100 |
| commit | 87dac464d9ec488737b16839b0f06586eadb837e (patch) | |
| tree | 3502cdcef4e27742f3b3ae1031371dafb15b2714 /src/modelutils.h | |
| parent | fff41be8455e588d181c7349678dff6fe29be76b (diff) | |
Fix position of markers in scrollbar for non-flat models.
Diffstat (limited to 'src/modelutils.h')
| -rw-r--r-- | src/modelutils.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modelutils.h b/src/modelutils.h index f355c0d6..b5becb6c 100644 --- a/src/modelutils.h +++ b/src/modelutils.h @@ -4,6 +4,10 @@ #include <QAbstractItemView> #include <QAbstractItemModel> +// retrieve all the row index under the given parent +QModelIndexList flatIndex( + const QAbstractItemModel* model, int column = 0, const QModelIndex& parent = QModelIndex()); + // convert back-and-forth through model proxies QModelIndex indexModelToView(const QModelIndex& index, const QAbstractItemView* view); QModelIndexList indexModelToView(const QModelIndexList& index, const QAbstractItemView* view); |
