You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
511 B
26 lines
511 B
import QtQuick 2.10
|
|
import QtQuick.Controls 2.3
|
|
import de.skycoder42.QtMvvm.Sample 1.1
|
|
|
|
ListView {
|
|
id: drawerView
|
|
|
|
property DrawerViewModel viewModel: null
|
|
property Drawer drawer: null
|
|
|
|
model: viewModel.navModel
|
|
anchors.fill: parent
|
|
clip: true
|
|
|
|
ScrollBar.vertical: ScrollBar {}
|
|
|
|
delegate: ItemDelegate {
|
|
width: parent.width
|
|
text: viewModel.navModel.data(viewModel.navModel.index(index, 0)) //because "display" is not accessible
|
|
|
|
onClicked: {
|
|
viewModel.open(index);
|
|
drawer.close();
|
|
}
|
|
}
|
|
}
|
|
|