<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Problem with ListView populate transition]]></title><description><![CDATA[<p dir="auto">Hello everyone!</p>
<p dir="auto">I'm having some difficulties while trying to use a transition on a ListView, when I populate this list with a ListModel with some ListElements. When I do the same thing, populating the ListView with a JSON everything works fine.</p>
<p dir="auto">Can anyone help me?</p>
<p dir="auto">Regards.</p>
]]></description><link>https://forum.qt.io/topic/60333/problem-with-listview-populate-transition</link><generator>RSS for Node</generator><lastBuildDate>Thu, 10 Sep 2026 21:51:00 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/60333.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 04 Nov 2015 12:51:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem with ListView populate transition on Sat, 14 Nov 2015 05:38:59 GMT]]></title><description><![CDATA[<p dir="auto">@renatobibiano Ok. Try giving <code>width</code> and <code>height</code> explicitly for components where you have used <code>anchors.fill: parent</code>.</p>
]]></description><link>https://forum.qt.io/post/297929</link><guid isPermaLink="true">https://forum.qt.io/post/297929</guid><dc:creator><![CDATA[p3c0]]></dc:creator><pubDate>Sat, 14 Nov 2015 05:38:59 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with ListView populate transition on Thu, 12 Nov 2015 17:35:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/p3c0">@<bdi>p3c0</bdi></a> I've changed the Layout to widths and heights and it still don't work :(</p>
]]></description><link>https://forum.qt.io/post/297753</link><guid isPermaLink="true">https://forum.qt.io/post/297753</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Thu, 12 Nov 2015 17:35:22 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with ListView populate transition on Fri, 06 Nov 2015 06:26:37 GMT]]></title><description><![CDATA[<p dir="auto">@renatobibiano It's hard to find out the exact problem but I think something related to layouts is messed up in your code. Try commenting out all layout related stuff and try again.</p>
]]></description><link>https://forum.qt.io/post/296877</link><guid isPermaLink="true">https://forum.qt.io/post/296877</guid><dc:creator><![CDATA[p3c0]]></dc:creator><pubDate>Fri, 06 Nov 2015 06:26:37 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with ListView populate transition on Fri, 06 Nov 2015 05:54:11 GMT]]></title><description><![CDATA[<p dir="auto">Here is a simple code that also do not work:</p>
<pre><code>import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.2
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.2

ApplicationWindow {
    title: qsTr("Test")
    width:  250
    height: 400
    visible: true

    Rectangle{
        id: self
        anchors.fill: parent

        ColumnLayout {
            id: columnLayout
            width: parent.width
            height: parent.height
            spacing: 0

            Item {
                Layout.fillHeight: true
                Layout.fillWidth: true
                clip: true

                Rectangle {
                    height: 2
                    width: parent.width
                    color: "#22000000"
                    z: list.z + 1
                }

                ListView {
                    id: list
                    anchors.fill: parent
                    model: ListModel {
                        ListElement {
                            name: "item 1"
                        }
                        ListElement {
                            name: "item 2"
                        }
                        ListElement {
                            name: "item 3"
                        }
                    }

                    delegate: Rectangle {
                        id: item
                        width: self.width
                        height: 100
                        color: "#EAEAEA"

                        RowLayout {
                            anchors.fill: parent
                            spacing: 0

                            Item {
                                Layout.preferredHeight: parent.height
                                Layout.fillWidth: true

                                Label {
                                    text: name
                                    color: "#000000"
                                    font.bold: true
                                    font.pixelSize: 12
                                    anchors.verticalCenter: parent.verticalCenter
                                }
                            }
                        }

                        Rectangle {
                            width: item.width*0.9
                            height: 2
                            color: "#22050505"
                            anchors.bottom: item.bottom
                            anchors.horizontalCenter: parent.horizontalCenter
                        }
                    }

                    populate: Transition {
                        NumberAnimation { properties: "y"; duration: 1000; easing.type: Easing.OutBack }
                    }
                }
            }
        }
    }
}
</code></pre>
]]></description><link>https://forum.qt.io/post/296777</link><guid isPermaLink="true">https://forum.qt.io/post/296777</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Fri, 06 Nov 2015 05:54:11 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with ListView populate transition on Thu, 05 Nov 2015 12:51:16 GMT]]></title><description><![CDATA[<p dir="auto">@renatobibiano Not sure. Does it work with <code>add</code>  when you later add items to it ? The example you posted doesn't run as the model is undefined. Can you post a minimal example that can show the problem ?</p>
]]></description><link>https://forum.qt.io/post/296771</link><guid isPermaLink="true">https://forum.qt.io/post/296771</guid><dc:creator><![CDATA[p3c0]]></dc:creator><pubDate>Thu, 05 Nov 2015 12:51:16 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with ListView populate transition on Thu, 05 Nov 2015 11:53:11 GMT]]></title><description><![CDATA[<p dir="auto">Here is my code:</p>
<pre><code>import QtQuick 2.5
import QtQuick.Controls 1.4
import QtQuick.Layouts 1.2
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.2

Rectangle{
    id: self
    objectName: "studentView"
    color: ui.whiteRGB

    ColumnLayout {
        id: columnLayout
        width: parent.width
        height: parent.height
        spacing: 0

        /****************************************************
            Initial bar with some information
         ****************************************************/
        Rectangle {
            id: studentBar
            Layout.preferredHeight: ui.mm(15)
            Layout.fillWidth: true
            color: ui.studentBarRGB

            Rectangle {
                id: frame
                color: "#EAEAEA"
                width: ui.mm(12)
                height: ui.mm(12)
                radius: 50
                border.color: ui.whiteRGB
                border.width: ui.mm(1)
                anchors.verticalCenter: parent.verticalCenter
                anchors.left: parent.left
                anchors.leftMargin: parent.width*0.2

                Image {
                    id: user
                    source: "qrc:/assets/images/pessoa_1.svg"
                    sourceSize.height: ui.mm(9)
                    sourceSize.width: ui.mm(9)
                    anchors.verticalCenter: parent.verticalCenter
                    anchors.horizontalCenter: parent.horizontalCenter
                    fillMode: Image.PreserveAspectCrop
                }
            }

            Label {
                id: studentLbl
                anchors.left: parent.left
                anchors.leftMargin: parent.width*0.5
                anchors.top: parent.top
                anchors.topMargin: ui.mm(3)
                text: {
                    var split = ui.studentName.split(" ");
                    return split[0];
                }
                font.bold: true
                font.family: ui.studentFont
                font.pixelSize: ui.mm(3.5)
                color: ui.whiteRGB
            }

            Label{
                id: serieLbl
                text: ui.studentClass
                font.family: ui.toolBarFont
                font.pixelSize: ui.mm(3)
                anchors.left: parent.left
                anchors.leftMargin: parent.width*0.5
                anchors.bottom: parent.bottom
                anchors.bottomMargin: ui.mm(2)
            }
        }

        Item {
            Layout.preferredWidth: parent.width
            Layout.preferredHeight: parent.height - studentBar.height
            clip: true

            Rectangle {
                height: ui.mm(0.2)
                width: parent.width
                color: "#22000000"
                z: list.z + 1
            }

            ListView {
                id: list
                anchors.fill: parent
                model: MenuModel {}

				//with this animation the list don't work
                populate: Transition {
                    NumberAnimation { properties: "y"; duration: 1000; easing.type: Easing.OutBack }
                }

                delegate: Rectangle {
                    id: item
                    width: self.width
                    height: ui.mm(10)
                    color: (itemArea.pressed) ? "#EAEAEA" : ui.whiteRGB
                    opacity: (itemArea.pressed) ? 0.5 : 1

                    RowLayout {
                        anchors.fill: parent
                        spacing: 0

                        Rectangle {
                            id: imgRec
                            Layout.preferredWidth: ui.mm(10)
                            Layout.preferredHeight: ui.mm(10)
                            Layout.leftMargin: ui.mm(1)
                            color: ui.whiteRGB

                            Image {
                                source: image
                                sourceSize.height: ui.mm(9)
                                sourceSize.width: ui.mm(9)
                                anchors.verticalCenter: parent.verticalCenter
                                anchors.horizontalCenter: parent.horizontalCenter
                                fillMode: Image.PreserveAspectCrop
                            }
                        }

                        Item {
                            Layout.preferredWidth: parent.width
                            Layout.preferredHeight: parent.height

                            Label {
                                id: menuName
                                text: name
                                color: ui.backgroundRGB
                                font.bold: true
                                font.pixelSize: ui.mm(3)
                                font.family: ui.menuFont
                                anchors.verticalCenter: parent.verticalCenter
                                anchors.left: parent.left
                                anchors.leftMargin: ui.mm(5)
                            }
                        }
                    }

                    Rectangle {
                        width: item.width*0.9
                        height: ui.mm(0.2)
                        color: "#22050505"
                        anchors.bottom: item.bottom
                        anchors.horizontalCenter: parent.horizontalCenter
                    }

                    MouseArea{
                        id: itemArea
                        anchors.fill: parent
                        onClicked: {
                            ui.pushItem({"item" : Qt.resolvedUrl(qml)});
                        }
                    }
                }
            }
        }
    }
}
</code></pre>
]]></description><link>https://forum.qt.io/post/296763</link><guid isPermaLink="true">https://forum.qt.io/post/296763</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Thu, 05 Nov 2015 11:53:11 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with ListView populate transition on Thu, 05 Nov 2015 05:51:26 GMT]]></title><description><![CDATA[<p dir="auto">Hi @renatobibiano It would be more helpful if you post the code.</p>
]]></description><link>https://forum.qt.io/post/296711</link><guid isPermaLink="true">https://forum.qt.io/post/296711</guid><dc:creator><![CDATA[p3c0]]></dc:creator><pubDate>Thu, 05 Nov 2015 05:51:26 GMT</pubDate></item></channel></rss>