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 ListViews
Forum Updated to NodeBB v4.3 + New Features

Synchronize ListViews

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 1.0k 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.
  • E Offline
    E Offline
    ephe
    wrote on last edited by
    #1

    I'm trying to synchronize a couple of ListViews. I have a global property "globalContentY" which is bound to
    @
    property int globalContentY: panel.children.length > 0 && panel.flickedView!== -1 && panel.children[panel.flickedView] !== undefined ? panel.children[panel.flickedView].listContentY : 0
    @
    "panel" is the item which contains the ListViews and "flickedView" is the index of the ListView which was flicked.
    "listContentY" is just an alias for listView.contentY
    @
    property alias listContentY: listView.contentY
    @

    Now I'm trying to bind the contentY of each ListView to the globalContentY
    @
    contentY: if(getIndex() != panel.flickedView) {panel.globalContentY}
    @

    I'm getting the error "Unable to assign [undefined] to double contentY", which is clear to me, because I don't assign anything when I'm setting the contentY of the flicked view.
    I don't know what I should do about that problem, because when I assign contentY in the else, the flicking does not work anymore (the column is just moving a bit)
    Can somebody help me or does anybody have an idea about a better solution?

    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