For example i have 2 different QML elemnts with common property such as:
import QtQuick 2.0
Rectangle {
width: 360
height: 360
Text {
id: t
color: "red"
text: qsTr("Hello World")
anchors.top: parent.top
}
TextInput {
text: qsTr("Hello all!")
color: "red"
anchors.top: t.bottom
}
}
You can see, that Text and TextInput have equal property called "color" with equal value.
In QSS i can use common property value, for example:
QWidget {
background: "red"
}
and all QWidgets, that belong the qss widget also will have red background.
Is way for set common property in QML?