Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Simple yet insurmountable PathView issue <3
Forum Updated to NodeBB v4.3 + New Features

Simple yet insurmountable PathView issue <3

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 456 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.
  • A Offline
    A Offline
    Ayelis
    wrote on last edited by
    #1

    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
    0
    • A Offline
      A Offline
      Ayelis
      wrote on last edited by
      #2

      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
      0

      • Login

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