blob: faecd9bb5884b33485f73fa1557fe71d1f88c19e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
import QtQuick 1.1
import Ubuntu.Components 0.1
import Ubuntu.Components.ListItems 0.1 as ListItem
Loader {
property variant menu
//height: childrenRect.height
onMenuChanged: {
if (menu) {
if (menu.linkSection)
source = "MenuSection.qml"
else if (menu.linkSubMenu)
source = "SubMenu.qml"
else
source = "Menu.qml";
}
console.debug("Load: " + source)
}
onStatusChanged: {
if (status == Loader.Ready) {
if (menu.linkSection)
item.menu = menu
else if (menu.linkSubMenu)
item.menu = menu
else if (menu)
item.menu = menu
}
}
}
|