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. QML force delegate instantiation
QtWS25 Last Chance

QML force delegate instantiation

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmldelegate
2 Posts 2 Posters 442 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.
  • L Offline
    L Offline
    lamozg6
    wrote on 28 Apr 2021, 13:48 last edited by
    #1

    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
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 29 Apr 2021, 10:41 last edited by
      #2

      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
      1

      1/2

      28 Apr 2021, 13:48

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved