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. [SOLVED] ListView: How to get the index of the currently shown (not the selected) Delegate/Item

[SOLVED] ListView: How to get the index of the currently shown (not the selected) Delegate/Item

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 901 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.
  • D Offline
    D Offline
    DerMas
    wrote on last edited by
    #1

    I have a ListView which fills a Rectangle. Each Delegate of the ListView has the size of the ListView, so that only one Item of the ListView can be shown at once. To ensure this, I use "SnapMode: ListView.SnapOneItem".
    But how can I know, which of the Items ist currently shown? I want to change the text of a Text Element (which is outside of the ListView) that corresponds to the currently visible ListView Item.

    Is this somehow possible?

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      I suppose "this":http://qt-project.org/forums/viewthread/42864/ thread might help you.

      157

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DerMas
        wrote on last edited by
        #3

        Thanks man, just the link I needed :-)

        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