import QtQuick 2.0 Item { Rectangle { id: rect1 width: 20 height: 20 color: "green" } Rectangle { id: rect2 x: 20 width: 20 height: 20 color: "red" } }