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

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

  • Moderators

    Hi @archeria
    Can you post the code ?

  • Yeah, here you go:
    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:
    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).

Log in to reply

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