29

QMLのComponentとの違いは何ですか? Itemドキュメントはここでは完全に明確ではありません。複数のウィジェットのコンテナとして使用するのに適したタイプは何ですか? で交換できますRectangleか?

たとえば、次の宣言の違いは何ですか。

Item {
    id: itemWidget

    Rectangle { id: one }
    Rectangle { id: two }
}

Component {
    id: componentWidget

    Rectangle { id: one }
    Rectangle { id: two }
}

Componentを宣言するときに通常使用するのはなぜdelegateですか?

4

2 に答える 2