Skip to content

Add default vertical scrollbar to TableView#45

Open
AndrewSazonov wants to merge 1 commit intodevelopfrom
scrollbar_tableview
Open

Add default vertical scrollbar to TableView#45
AndrewSazonov wants to merge 1 commit intodevelopfrom
scrollbar_tableview

Conversation

@AndrewSazonov
Copy link
Copy Markdown
Member

This PR adds the existing EaElements.ScrollBar as the default vertical scrollbar for TableView with AsNeeded policy and interactive behavior enabled.

@AndrewSazonov AndrewSazonov requested a review from seventil April 22, 2026 12:05
@AndrewSazonov AndrewSazonov added the [scope] enhancement Adds/improves features (major.MINOR.patch) label Apr 22, 2026
Copy link
Copy Markdown

@seventil seventil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add topInset and topPadding to the ScrollBar if you want to ofset height for the header.
I guess with AsNeeded policy user only sees a narrow indicator-like bar anyway, and they can interact with it if they want, so it's totally OK to define interactive:true.

Here's an example from listview just for reference:

property real _headerHeight: headerItem ? headerItem.height : 0
ScrollBar.vertical: EaElements.ScrollBar {
        policy: listView.scrollBarPolicy
        interactive: listView.scrollBarInteractive
        topInset: listView._headerHeight
        topPadding: listView._headerHeight
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[scope] enhancement Adds/improves features (major.MINOR.patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants