Qt Forum

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

    Call for Presentations - Qt World Summit

    How to force listview to draw all items?

    QML and Qt Quick
    1
    1
    840
    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
      lichti last edited by

      Hi *,

      I have a data model in c++ and a listview for showing the stuff. The delegate is only a Loader item which load the items from diferent files based on the path inside the model. It works very well. But now I have the exact same thing but with other files ( 2 listviews each showing an item ). Item1 in listview1 belongs to item1 in listview2 and vs. Therefore I register the item in a javascript array.
      My problem is following:

      if the model contains only one item every thing is working well - but after adding one more and updating the model listview1 is only creating one item but listview2 creates both and the second can't find itself in the js-array.
      If I set the currentIndex of listview1 to 1 ( the second item) the delegate creates the item.

      Can give anybody an idea how I can force the listview to draw all items?

      Thanks in advance.

      Cheers,
      lichti

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