Adding Items to a layout of a custom component
问题 I have a custom Footer Component which I would like to reuse in different place in my QML App: Rectangle { color: "gold" height: 50 anchors { bottom: parent.bottom left: parent.left right: parent.right } RowLayout { anchors.fill: parent anchors.margins: 10 Button { text: "quit" } } } The use of this is easy: Window { visible: true Footer { } } But now I would like to add a "ButtonA" to the RowLayout of my Footer in one view and a "ButtonB" in another view. How can I achieve that? 回答1: See