Why cannot define aliases for Styles? For instance
Button {
property alias color: theText.color
style: ButtonStyle {
label: Text {
id: theThext
}
}
}
gives an
qml invalid alias reference unable to find id for
theText
Similarly to this answer, it's because the item that the alias
refers to is loaded dynamically. Style components like Label
are just that: Component
s. They are templates that are used to create the actual style Item
s which are actually loaded with Loader
.