Margin

APIRendererItemMargin

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

Margin::left

Type:
Float
Default value:
0

Margin::onLeftChange(oldValue)

Parameters:
  • oldValue — Float
Type:
Signal

Source

Margin::top

Type:
Float
Default value:
0

Margin::onTopChange(oldValue)

Parameters:
  • oldValue — Float
Type:
Signal

Source

Margin::right

Type:
Float
Default value:
0

Margin::onRightChange(oldValue)

Parameters:
  • oldValue — Float
Type:
Signal

Source

Margin::bottom

Type:
Float
Default value:
0

Margin::onBottomChange(oldValue)

Parameters:
  • oldValue — Float
Type:
Signal

Source

Margin::horizontal

Type:
Float
Default value:
0

Sum of the left and right margin.

Margin::onHorizontalChange(oldValue)

Parameters:
  • oldValue — Float
Type:
Signal

Source

Margin::vertical

Type:
Float
Default value:
0

Sum of the top and bottom margin.

Margin::onVerticalChange(oldValue)

Parameters:
  • oldValue — Float
Type:
Signal

Source

Margin::valueOf()

Returns:
Float

Source