ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #04193
Re: [qml] anchors.fill error in ListView
Hi Sam!
There are two ways to solve it:
1. Remove root Column element, use ListView as root instead
2. Preserve your "left and right anchors", but set ListView's height to
nonzero value (by default it have zero height, you still able to see one
item because "crop" property is set to false by default).
BR,
Roman.
2013/9/21 Sam Bull <sam.hacking@xxxxxxxx>
> I am receiving an error when running my app, about using anchors.fill.
> If I replace anchors.fill with left and right anchors only, then the
> ListView only displays one item. Is there a way to make the code work
> AND get rid of the error? I only seem to be able to do one or the other.
> The error and relevant snippet of code are below.
>
> QML Column: Cannot specify top, bottom, verticalCenter, fill or
> centerIn anchors for items inside Column. Column will not
> function.
>
> Column {
> anchors.fill: parent
>
> ListView {
> anchors.fill: parent
> model: addresses
>
> delegate: ListItem.Standard {
> text: address
> onClicked: print("Address")
> enabled: false
> }
> }
> }
>
> --
> Mailing list: https://launchpad.net/~ubuntu-phone
> Post to : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ubuntu-phone
> More help : https://help.launchpad.net/ListHelp
>
>
References