|  | Home · All Classes · Modules

# QGraphicsAnchor Class Reference
[QtGui module]

The QGraphicsAnchor class represents an anchor between two items in a QGraphicsAnchorLayout. More...

Inherits QObject.

### Methods

- setSizePolicy (self, QSizePolicy.Policy policy)
- setSpacing (self, float spacing)
- QSizePolicy.Policy sizePolicy (self)
- float spacing (self)
- unsetSpacing (self)

## Detailed Description

The QGraphicsAnchor class represents an anchor between two items in a QGraphicsAnchorLayout.

The graphics anchor provides an API that enables you to query and manipulate the properties an anchor has. When an anchor is added to the layout with QGraphicsAnchorLayout.addAnchor(), a QGraphicsAnchor instance is returned where the properties are initialized to their default values. The properties can then be further changed, and they will be picked up the next time the layout is activated.

## Method Documentation

### QGraphicsAnchor.setSizePolicy (self, QSizePolicy.Policy policy)

### QGraphicsAnchor.setSpacing (self, float spacing)

### QSizePolicy.Policy QGraphicsAnchor.sizePolicy (self)

### float QGraphicsAnchor.spacing (self)

### QGraphicsAnchor.unsetSpacing (self)