Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Bind ListView to custom non-attached scroll bar
QtWS25 Last Chance

Bind ListView to custom non-attached scroll bar

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 244 Views
  • 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.
  • B Offline
    B Offline
    Bob64
    wrote on last edited by Bob64
    #1

    I am revisiting some code I worked on a while ago. I know I had to jump through some hoops to get things working how I needed them to, so things aren't necessarily done in the most standard way. One aspect of this is that I have a ListView and a non-attached custom vertical ScrollBar. Essentially, the scrollbar is in a separate rectangle, adjacent to the ListView.

    My question: is there a standard way to bind the visible position of the ListView to the scrollbar position?

    What I actually did was this (in the ListView):

        contentY: contentHeight * vbar.position
    

    At this point, I have no recollection of how I arrived at this approach. I have not been able to find any documentation suggesting it. Although it seems to work well enough, I am noticing some occasional binding loop errors for contentY in the debug console. They do not appear to have any visible impact but I am still concerned so I wondered if there was another approach I could try.

    B 1 Reply Last reply
    0
    • B Bob64

      I am revisiting some code I worked on a while ago. I know I had to jump through some hoops to get things working how I needed them to, so things aren't necessarily done in the most standard way. One aspect of this is that I have a ListView and a non-attached custom vertical ScrollBar. Essentially, the scrollbar is in a separate rectangle, adjacent to the ListView.

      My question: is there a standard way to bind the visible position of the ListView to the scrollbar position?

      What I actually did was this (in the ListView):

          contentY: contentHeight * vbar.position
      

      At this point, I have no recollection of how I arrived at this approach. I have not been able to find any documentation suggesting it. Although it seems to work well enough, I am noticing some occasional binding loop errors for contentY in the debug console. They do not appear to have any visible impact but I am still concerned so I wondered if there was another approach I could try.

      B Offline
      B Offline
      Bob64
      wrote on last edited by
      #2

      Just giving this a little bump as I haven't been able to find any more information about it. Hoping that someone might see it who missed it first time...

      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