Define my own anchor lines?
-
Can i defines my own anchor lines? For example, i have a custom item of a button with an image in it, That image includes a bottom shadow. Now the vertical center line is the center of the image, including the shadow. On the screen it doesn't look centered.
Now i want to have the center anchor line of my custom item shifted up some pixels. Same applies for the bottom anchor line.
Can i do that in Qml in my item? -
You can shift the anchor using anchor margins:
@
Something {
anchors.leftMargin: 5
anchors.topMargin: 6
}
@ -
maybe {
anchors.margin: auto;
}probably center all margins horizontal and vertical. This is from CSS3.