QTreeView - Custom Scroll Bar



  • Hello,

    I am using QTreeView and it comes with built in scroll bar where I don't have much control, for example, when I press and hold the down arrow in the scroll bar, I want to control the speed of scrolling, etc, etc. I want to control the events from the built in scroll bar. Is it possible?

    If not, Is there a way that I can implement my own scroll bar and tell QTreeView to use it?

    Thank you!

    Kumara



  • Hi @kumararajas

    QTreeView is a QAbstractItemView, which is a QAbstractScrollArea. There you have the functions setHorizontalScrollBar and setVerticalScrollBar. So it should be possible to use your own scrollbars.

    -Michael.



  • @m.sue said in QTreeView - Custom Scroll Bar:

    QTreeView is a QAbstractItemView, which is a QAbstractScrollArea. There you have the functions setHorizontalScrollBar and setVerticalScrollBar. So it should be possible to use your own scrollbars.

    Thanks for the response Mike!

    I will try this and get back with the results.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.