In a QML code, I want to put a label containing capitalised words inside an image.The label is at the bottom of the image and I want the bottom of the text to match with the edge of the image (for example, like the graph paper from a diary). By making the bottom of both match with
anchors.bottom: myImage.bottom
I can't avoid having some space between the letters and the edge of the image.
I have simplified it into an example as follows:
Rectangle { id: content width: 300 height: 300 color: "blue" Label { text: "ABC" color: "black" font.pixelSize: 200 anchors.bottom: content.bottom anchors.horizontalCenter: content.horizontalCenter background: Rectangle{ color: "green" } }}
And I can see that there is a green space between the letters and the bottom of the blue rectangle.
Is there a simple way to fix this other than messing with the value of anchors.bottomMargin
?