QML embed text inside a RadioButton
-
If you are using the RadioButton from Qt.Quick.Controls you can make your own "RadioButtonStyle":http://qt-project.org/doc/qt-5/qml-qtquick-controls-styles-radiobuttonstyle.html
-
You can style RadioButton as previous post indicated. You can also develop your own radio button like the following.
@Rectangle {
width: 40
height: 40
radius: width/2
border.color: "black"
border.width: 2
Rectangle {
id :radio
anchors.centerIn: parent
width: parent.width-10
height: parent.height-10
radius: width/2
border.width: 1
border.color: "black"
Text {
anchors.centerIn: parent
text: "Wor"
}
}
MouseArea {
anchors.fill: parent
onClicked: {
radio.color = "black"
}
}
}@