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. Synchronize tableview scrollbars
QtWS25 Last Chance

Synchronize tableview scrollbars

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmltableviewscrollbar
3 Posts 3 Posters 1.9k 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.
  • P Offline
    P Offline
    PhTe
    wrote on last edited by
    #1

    Hi,
    i have 2 Tableviews in my qml file. One on the left side and one on the right. Both have the same amount of columns and rows, but different cell data.
    If the user scrolls in one of the tableviews the other should also scroll.
    Does anyone know a good solution for this? I did not find any events like 'onScroll' or so.

    I also tried to put all the data in one table but it looks terrible.

    p3c0P 1 Reply Last reply
    0
    • P PhTe

      Hi,
      i have 2 Tableviews in my qml file. One on the left side and one on the right. Both have the same amount of columns and rows, but different cell data.
      If the user scrolls in one of the tableviews the other should also scroll.
      Does anyone know a good solution for this? I did not find any events like 'onScroll' or so.

      I also tried to put all the data in one table but it looks terrible.

      p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      @PhTe flickableItem is your friend here. It could be done as follows:

      //Inside some TableView
      flickableItem.onContentYChanged: {
           mirror.flickableItem.contentY = flickableItem.contentY //mirror = id of other table 
      }
      

      157

      1 Reply Last reply
      1
      • D Offline
        D Offline
        Dan A Dsr
        wrote on last edited by
        #3

        I found it very helpful

        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