PySide6.QtWidgets.QGraphicsAnchor¶
- class QGraphicsAnchor¶
- The - QGraphicsAnchorclass represents an anchor between two items in a- QGraphicsAnchorLayout. More…- Added in version 4.6. - Synopsis¶- Properties¶- sizePolicyᅟ- The size policy for the QGraphicsAnchor
- spacingᅟ- The preferred space between items in the QGraphicsAnchorLayout
 - Methods¶- def - setSizePolicy()
- def - setSpacing()
- def - sizePolicy()
- def - spacing()
- def - unsetSpacing()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- 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 - addAnchor(), a- QGraphicsAnchorinstance 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.- See also - Note - Properties can be used directly when - from __feature__ import true_propertyis used or via accessor functions otherwise.- property sizePolicyᅟ: QSizePolicy.Policy¶
 - This property holds the size policy for the - QGraphicsAnchor..- By setting the size policy on an anchor you can configure how the anchor can resize itself from its preferred spacing. For instance, if the anchor has the size policy - Minimum, the spacing is the minimum size of the anchor. However, its size can grow up to the anchors maximum size. If the default size policy is- Fixed, the anchor can neither grow or shrink, which means that the only size the anchor can have is the spacing.- Fixedis the default size policy.- QGraphicsAnchoralways has a minimum spacing of 0 and a very large maximum spacing.- See also - Access functions:
 - property spacingᅟ: float¶
 - This property holds the preferred space between items in the - QGraphicsAnchorLayout..- Depending on the anchor type, the default spacing is either 0 or a value returned from the style. - See also - Access functions:
 - Setter of property - sizePolicyᅟ.- Setter of property - spacingᅟ.- sizePolicy()¶
- Return type:
 - See also 
 - Getter of property - sizePolicyᅟ.- spacing()¶
- Return type:
- float 
 - See also 
 - Getter of property - spacingᅟ.- unsetSpacing()¶
 - Reset function of property - spacingᅟ.