Skip to content

ListView component with multi-row selection#37

Open
seventil wants to merge 51 commits intodevelopfrom
selectable_table_view
Open

ListView component with multi-row selection#37
seventil wants to merge 51 commits intodevelopfrom
selectable_table_view

Conversation

@seventil
Copy link
Copy Markdown
Contributor

@seventil seventil commented Mar 20, 2026

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: multiSelection enables 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 via scrollBarPolicy (accepts ScrollBar.Policy directly — no custom enum) and scrollBarInteractive, which together cover indicator-style, always-on draggable, and fully hidden modes from a single ScrollBar attachment. Additional knobs: tallRows, maxRowCountShow, defaultInfoText, selectionActive, and clearSelection().

@seventil seventil self-assigned this Mar 20, 2026
@seventil seventil added [scope] enhancement Adds/improves features (major.MINOR.patch) [priority] medium Normal/default priority labels Mar 20, 2026
@seventil
Copy link
Copy Markdown
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.

@seventil
Copy link
Copy Markdown
Contributor Author

I'll have to wait for the scrollbars to merge to see how well the final version of this ListView works

@seventil
Copy link
Copy Markdown
Contributor Author

seventil commented Apr 17, 2026

The issue I ran into during development: selected rows look fine with default label colorl but absolutely horrendous with disabled or recently-selected markings
selection-light
selection-dark

Potential fix is to have separate text selection colors, but thats a lot. The other potential fix is to have less difference in selection from regular background color. I'll have to think about that.

@seventil seventil changed the title added a draft version of a new selectable table view ListView component with multi-row selection Apr 29, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@c55d01c). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff            @@
##             develop     #37   +/-   ##
=========================================
  Coverage           ?   0.00%           
=========================================
  Files              ?       4           
  Lines              ?     387           
  Branches           ?       0           
=========================================
  Hits               ?       0           
  Misses             ?     387           
  Partials           ?       0           
Flag Coverage Δ
integration 0.00% <ø> (?)
unittests 0.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@seventil seventil marked this pull request as ready for review April 30, 2026 14:19
@seventil seventil requested a review from AndrewSazonov April 30, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[priority] medium Normal/default priority [scope] enhancement Adds/improves features (major.MINOR.patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant