Hello,
does using Loaders decrease the runtime needed to create a custom Component?
MyComponent.qml
Without Loader:
import QtQuick 2.2
MouseArea {
width: 72
height: 72
Rectangle {
anchors.fill: parent
color: "green"
Column {
Text {
text: "Test text"
}
...
}
}
}
With Loaders:
import QtQuick 2.2
MouseArea {
width: 72
height: 72
property Component __text: Text {
text: "Test text"
}
Rectangle {
anchors.fill: parent
color: "green"
Column {
Loader {
sourceComponent: __text
}
...
}
}
}
↧