Repository navigation
ListView component with multi-row selection - #37
Conversation
…ScrollBar/verticalScrollIndicator properties Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…here are more items available even in abscence of scrollbar/scrollindicator
Instead of dynamically catching the width of header labels and propagating them to the delegates with a timer, the widths are now defined at the top-level listview component. See the examples given
|
The selection stays even outside the focus and I haven't made up my mind on what to do with that. Many such tables with many selections and its tiring. Maybe the user should clear selections from the buttons that are supposed to read the listview, calling the clearSelection() method. |
|
I'll have to wait for the scrollbars to merge to see how well the final version of this ListView works |
…der from headerItem
…op textinput editing
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #37 +/- ##
=======================================
Coverage 0.00% 0.00%
=======================================
Files 4 4
Lines 387 387
=======================================
Misses 387 387
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
…owing text are showed from the start
…, so that loading from backend also resets cursor to 0
AndrewSazonov
left a comment
There was a problem hiding this comment.
Thanks for implementing this. Looks good to me!
Just one small request here, plus a couple of notes in the code. In the old TableView, delegate cells automatically used the horizontalAlignment from the corresponding header cells, so we didn’t have to define it twice. Could we keep the same behavior as the default in this ListView, while still allowing individual delegate cells to override it?
Also, could you merge the latest develop into this branch and rerun the checks to see if that fixes the CI failures?
Better explanation for selection toggle Co-authored-by: Andrew Sazonov <AndrewSazonov@users.noreply.github.com>
…et clicks for interactive elements in the header
…citWidths / columnWidths
I added functionality to make column aligmnents, but it's implemented the same way as the widths and doesn't follow the TableView style with autoupdates (i had issues with tableview-style updates on widths and alignments). |
Adds a ListView component (plus ListViewHeader, ListViewDelegate, and ListViewTextInput) as a styled QtQuick ListView replacement for the existing TableView components. Column widths are managed at the ListView level via columnWidths (fixed px or -1 flex) and propagated to the header and delegates, avoiding the timer-based header label measurement of the previous approach.
The public API exposes flags to control behaviour without needing to subclass:
multiSelectionenables Ctrl/Shift modifier-based range and toggle selection on top of plain single-click;selectOnEdit(default false) keeps cell editing orthogonal to row selection — clicking into an inline editor never selects the row, with true restoring the legacy auto-select-on-edit behaviour. Scrollbar appearance is fully consumer-controlled viascrollBarPolicy(accepts ScrollBar.Policy directly — no custom enum) andscrollBarInteractive, which together cover indicator-style, always-on draggable, and fully hidden modes from a single ScrollBar attachment. Additional knobs:tallRows,maxRowCountShow,defaultInfoText,selectionActive, andclearSelection().