Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4100492
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:34:25+00:00 2026-05-20T20:34:25+00:00

When expanding an item at the bottom of a QTreeView, the view does not

  • 0

When expanding an item at the bottom of a QTreeView, the view does not automatically scroll to show the newly-expanded items. I can fix this by detecting expansion and performing the scroll myself when appropriate.

However, I would instead like to allow the user to scroll the view farther than is currently allowed. Currently, if the tree is too tall to fit in the visible area, the view can be scrolled only until the bottom-most row comes into view.

I believe this should be doable by tricking the QTreeView’s size calculation, but even after source diving I don’t understand the interaction between QTreeView and its base QAbstractScrollArea well enough to know what to poke, or where to start poking.

If all else fails I may just add some dummy, non-editable rows to my data model.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T20:34:26+00:00Added an answer on May 20, 2026 at 8:34 pm

    you can add extra white space to the treeview by increasing its vertical scrollbar maximum value. Smth like this:

    max = self.treeview.verticalScrollBar().maximum()
    self.treeview.verticalScrollBar().setMaximum(max*2)
    

    hope this helps, regards

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Expanding on recent_posts_on_self below, I want to add an all_recent_posts_on_self method but I'm not
Can I apply clipview to a vertical expanding Group? Time to time I'm appending
Having problem with the middle Div not expanding to the width http://acs.graphicsmayhem.com/images/middiv.jpg Ok, how
I am making a custom list view item. Extending View and overriding the onDraw
i have some jquery thats expanding/collapsing on click. i would like the first item
I have a table of items. Each item has detail. The table alternates between
Expanding on Jon Skeet's answer to This Previous Question . Skeet doesn't address the
My app is expanding, but the reqs dictate that there should be only one
I'm expanding my php and general coding knowledge by writing my own 'simple' CMS
I have a problem with expanding JTree nodes. I start when use selects a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.