import QtQuick import QtQuick.Templates as T T.Button { id: tsBut property int tsWidth: tsButtonText.width + 10 property int tsHeight: tsButtonText.height + 8 height: tsHeight width: tsWidth background: Rectangle { id: tsButton anchors.fill: parent radius: 50 color: "red" MouseArea { id: mouseArea anchors.fill: parent onClicked: tsBut.clicked() } Text { id: tsButtonText anchors.centerIn: parent color: "indigo" //font.pixelSize: 13 font: tsBut.font text: tsBut.text } } }