Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QTreeView - Custom Scroll Bar
Forum Updated to NodeBB v4.3 + New Features

QTreeView - Custom Scroll Bar

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 964 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kumararajas
    wrote on last edited by
    #1

    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

    --Kumar

    m.sueM 1 Reply Last reply
    0
    • K kumararajas

      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

      m.sueM Offline
      m.sueM Offline
      m.sue
      wrote on last edited by
      #2

      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.

      K 1 Reply Last reply
      1
      • m.sueM m.sue

        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.

        K Offline
        K Offline
        kumararajas
        wrote on last edited by
        #3

        @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.

        --Kumar

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved