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. Repeater and item list
Forum Updated to NodeBB v4.3 + New Features

Repeater and item list

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

    I have list with QML items:
    @property list<Item> pages@

    I'd like to use this list with Repeater. For now I have to copy item data into Repeater's delegate:

    @
    Repeater {
    model: pages
    Item { data: modelData }
    }
    @

    Is there a way to avoid copying? The following doesn't work.

    @
    Repeater {
    model: pages
    delegate: modelData
    }
    @

    Thanks.

    Oleg

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbrasser
      wrote on last edited by
      #2

      Hi,

      I don't know of any way to do this with a list of items without wrapping. You may want to have a look at "VisualItemModel":http://doc.qt.nokia.com/4.7-snapshot/qml-visualitemmodel.html , and see if it might work for your needs.

      Regards,
      Michael

      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