@maxwell31 :
If the number of splits is fixed to one (i.e. 2 items), then you could define a property 'item' in each of your sub-views (equivalent to the 'contentItem' of e.g. ListView):
SplitView {
id: splitView
...
Rectangle {
id: upperScreen
color: "blue"
property Item item: null
Button {
id: expandCollapseButton
...
}
}
Rectangle {
id: lowerScreen
color: "red"
property Item item: null
}
}
Then, in some JS assuming you have instances someItem1 and someItem2, you could parent/reparent those to those content items:
lowerScreen.item = someItem1
someItem1.parent = lowerScreen
upperScreen.item = someItem2
someItem2.parent = upperScreen
upperScreen.item.text = "ALL IS OK!" //assuming someItem2 has a text property