ListView component with multi-row selection#37
Open
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
Contributor
Author
|
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. |
Contributor
Author
|
I'll have to wait for the scrollbars to merge to see how well the final version of this ListView works |
…der from headerItem
Contributor
Author
…input and disabled elements
…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%
=========================================
Files ? 4
Lines ? 387
Branches ? 0
=========================================
Hits ? 0
Misses ? 387
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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().