import QtQuick 2.9 import QtQuick.Controls 2.5 import QtQuick.Window 2.3 import QtQuick.Layouts Window { width: 640 height: 480 visible: true title: qsTr("Hello World") component MyButton : Button { id: fullSizeButton width: 150 height: 50 layer.enabled: true layer.effect: Rectangle { color: "blue" } } MyButton { anchors.centerIn: parent onClicked: { console.log("Button clicked") } } //This code will result in the same error /*component RowOfThings : RowLayout { Repeater { delegate: Item {} } } RowOfThings {}*/ }