Simple yet insurmountable PathView issue <3



  • 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.



  • 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?!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.