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. Giving Repeater a custom ListModel places the first element on the bottom of the window

Giving Repeater a custom ListModel places the first element on the bottom of the window

Scheduled Pinned Locked Moved QML and Qt Quick
qmlqtquickrepeaterlistview
3 Posts 2 Posters 1.5k 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
    archeria
    wrote on 20 Sept 2015, 18:44 last edited by archeria
    #1

    I have a repeater that creates a bunch of rects. When I give it an empty model with 3 elemtns, all 3 elements are nicely placed in a column. But when I give it a custom ListModel, the first (zeroest) item is placed outside of the window. Like this
    1
    2
    3
    ...
    0
    It happens with every ListModel I make. To see the first element I have to maximize the What is wrong?
    Edit: When I write "model: 3" inside Repeater everything's fine, but when I set model to 3 from outside, the first element is again on the bottom.

    P 1 Reply Last reply 21 Sept 2015, 08:04
    0
    • A archeria
      20 Sept 2015, 18:44

      I have a repeater that creates a bunch of rects. When I give it an empty model with 3 elemtns, all 3 elements are nicely placed in a column. But when I give it a custom ListModel, the first (zeroest) item is placed outside of the window. Like this
      1
      2
      3
      ...
      0
      It happens with every ListModel I make. To see the first element I have to maximize the What is wrong?
      Edit: When I write "model: 3" inside Repeater everything's fine, but when I set model to 3 from outside, the first element is again on the bottom.

      P Offline
      P Offline
      p3c0
      Moderators
      wrote on 21 Sept 2015, 08:04 last edited by
      #2

      Hi @archeria
      Can you post the code ?

      157

      1 Reply Last reply
      0
      • A Offline
        A Offline
        archeria
        wrote on 21 Sept 2015, 14:27 last edited by archeria
        #3

        Yeah, here you go: http://pastebin.com/7CZSCnsQ
        The problem is rep1. I figured it might be a bug in my Qt version and updated and now everything is broken and nothing will compile, so I can't give you a screenshot. But it's pretty much like in this fine paint art: http://imgur.com/jQHaAoL
        What I'm trying to show is that the 0. element is outside the the visible area, and if I resize it, it's still stuck to the bottom.
        Edit: I still have a backup of my system with the old version, so I could still roll back. But I want to wait, maybe someone can help me with the compiler errors first (other post).

        1 Reply Last reply
        0

        3/3

        21 Sept 2015, 14:27

        • Login

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