moment/harmonyqml/components/side_pane/RoomList.qml
miruka 76b699ad64 Organize project files
Put QML components into folders, remove unused ones, split __init__.py
with engine.py.
2019-03-26 05:52:43 -04:00

27 lines
572 B
QML

import QtQuick 2.7
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.4
import "../base" as Base
ListView {
property var user: null
property int contentHeight: 0
onCountChanged: {
var children = roomList.children
var childrenHeight = 0
for (var i = 0; i < children.length; i++) {
childrenHeight += children[i].height
}
contentHeight = childrenHeight + spacing * (children.length - 1)
}
id: "roomList"
spacing: 8
model: Backend.roomsModel[user.user_id]
delegate: RoomDelegate {}
}