Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved QML force delegate instantiation

    QML and Qt Quick
    qml delegate
    2
    2
    189
    Loading More Posts
    • 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.
    • L
      lamozg6 last edited by

      I have a ListView inside Scrollview and a delegate which instantiates items of ListView.

      After model change I want to force instantiation of delegates for all items in the model. I use cacheBuffer, so instantiated items won't gone.

      So the question is how can I achieve that?

      1 Reply Last reply Reply Quote 0
      • sierdzio
        sierdzio Moderators last edited by

        You should not want that. Delegates are only a visual representation of the model, and ListView is designed to only show (and instantiate) what the user needs to see. Forcing it to show everything will decrease performance.

        If you definitely need to generate UI for all elements in a model, use Repeater.

        (Z(:^

        1 Reply Last reply Reply Quote 1
        • First post
          Last post