while your are working on QML file need to hide some properties from upper layer Item ( some thing's like private variable and methods).
best case for get a right way for incapsulation in QML is to using a internal item like QtObject .
in your code used a QtObject for block the external direct access to button color and bind the color to the button item state.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…