[Interest] ListView won't fall in line.

Kevin Mcintyre kebin70 at gmail.com
Sun May 15 00:24:06 CEST 2016


// this seems wrong.  ListView doesn't heed column/row -- change to
repeater acts as expected.

import QtQuick 2.5
import QtQuick.Controls 1.4

ApplicationWindow {
    width: 400
    height: 400
    visible: true
    Column {
        anchors.fill: parent
        Row {
            Label {
                text: 'Hello'
            }
        }
        ListView {
            height: childrenRect.height
            id: view
            header: Row {
                Label { text: 'Model - ' + view.model.count }
            }
            footer: Row {
                Label { text: 'Footer'}
            }
            model: ListModel {
                ListElement {
                    modeltext: 'World'
                }
                ListElement {
                    modeltext: 'Testing'
                }
            }
            delegate: Row {
                Label { text: modeltext }
            }
        }
    }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160514/5f26f097/attachment.html>


More information about the Interest mailing list