Qt Forum

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

    Unsolved Simple yet insurmountable PathView issue <3

    General and Desktop
    1
    2
    375
    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.
    • A
      Ayelis last edited by

      I have less than three items in my ListModel. At any given time, I want three items to display onscreen, and as such, I have set pathItemCount:3.

      The ListModel may expand, and when it does, the pathItemCount appears to take care of only showing 3 items onscreen at once. However, when the number of items in the ListModel dips below 3, I still need 3 items to appear. The user interface needs to remain stable; when controls start disappearing on the user, the customer loses confidence in the supplier. So I'm looking to the community to help out here.

      Tell me why PathView isn't repeating items when the ListModel only has 1 or 2 items when pathItemCount is obviously 3. I can't buffer with 'empty items' since the path needs to be repeatable and the items need to reflect the repeating nature. How much memory does QT demand I waste creating extra ListModels to pad the edges? Also, if that's the real answer, please suggest code or examples that would clone and pad these ListModels. Thanks.

      1 Reply Last reply Reply Quote 0
      • A
        Ayelis last edited by

        Alright, I've implemented something like;

        while(pathviewModel.count < 3){
            pathviewModel.append({art: item.art})
        }
        

        But that seriously shouldn't be my only option. What hath QML wrought?!

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