import QtQuick 2.6 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 Rectangle { id: rectangle1 property alias btnAdd:btnAdd property alias toolBar: toolBar property alias listView:listView property alias listModel:listModel signal listItemClicked(int id) ListModel { id: tableModel } ToolBar{ id:toolBar anchors.left: parent.left anchors.right: parent.right RowLayout { anchors.fill: parent ToolButton { id:btnAdd text: qsTr("Adicionar"); } Item{ Layout.fillWidth: true } Label{ id:lblTitle Layout.rightMargin: 10 text:"Imagens do dia"; } } } ListModel { id:listModel } ListView { id: listView anchors.right: parent.right anchors.rightMargin: 0 anchors.left: parent.left anchors.leftMargin: 0 anchors.bottom: parent.bottom anchors.bottomMargin: 0 anchors.top: toolBar.bottom anchors.topMargin: 0 delegate: Item { height: 35 anchors{left: parent.left; right: parent.right;} Label { id: mainText anchors { left: parent.left; leftMargin: 10; verticalCenter: parent.verticalCenter } font {pixelSize: 10 } color: "#5D5D5D" text: model.title } MouseArea{ id:mouseArea anchors.fill: parent } Connections { target: mouseArea onClicked: listItemClicked(model.id) } } model: listModel } }