@JoeCFD No. I guess I should've specifically mentioned that I also looked into the Button group documentation (although I did originally talk about how AbstractButton and Exclusive, which are part of the Button group, will not work for me). Also, trying to make them as buttons completely screws up my entire layout for everything and I can never find helpful answers as to why, but that's a different subject for another time.
All I want to know is if it is possible with my current setup. If yes, how do I go about it? If no, why?
.
.
.
UPDATE: I found out that it is indeed possible, and it was incredibly simple! All I had to do was include some additional onClicked handlers to set the states of the other buttons to off.
Before:
MouseArea {
anchors.fill: parent
onClicked: leftSignal.buttonState = (leftSignal.buttonState === 'on') ? 'off' : 'on';
}
After:
MouseArea {
anchors.fill: parent
onClicked: {
rightSignal.buttonState = 'off';
brakeLights.buttonState = 'off';
parkingLights.buttonState = 'off';
leftSignal.buttonState = (leftSignal.buttonState === 'on') ? 'off' : 'on';
}
}