Margin

API ReferenceRendererItemMargin

Source

Margins are used in anchors and within layout items.

Rectangle {
    width: 100
    height: 100
    color: 'red'
    Rectangle {
        width: 100
        height: 50
        color: 'yellow'
        anchors.left: parent.right
        margin.left: 20
    }
}
Column {
    Rectangle { color: 'red'; width: 50; height: 50; }
    Rectangle { color: 'yellow'; width: 50; height: 50; margin.top: 20; }
    Rectangle { color: 'green'; width: 50; height: 50; }
}

Source


left

Type
Float
Default
0

onLeftChange()

Parameters
  • oldValue — Float
Type
Signal

Source


top

Type
Float
Default
0

onTopChange()

Parameters
  • oldValue — Float
Type
Signal

Source


Type
Float
Default
0

onRightChange()

Parameters
  • oldValue — Float
Type
Signal

Source


bottom

Type
Float
Default
0

onBottomChange()

Parameters
  • oldValue — Float
Type
Signal

Source


horizontal

Type
Float
Default
0

Sum of the left and right margin.


onHorizontalChange()

Parameters
  • oldValue — Float
Type
Signal

Source


vertical

Type
Float
Default
0

Sum of the top and bottom margin.


onVerticalChange()

Parameters
  • oldValue — Float
Type
Signal

Source


valueOf()

Returns
Float

Source

results matching ""

    No results matching ""