QGraphicsAnchor¶
The QGraphicsAnchor
class represents an anchor between two items in a QGraphicsAnchorLayout
. More…
New in version 4.6.
Synopsis¶
Functions¶
def
setSizePolicy
(policy)def
setSpacing
(spacing)def
sizePolicy
()def
spacing
()def
unsetSpacing
()
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 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.
See also
- class PySide6.QtWidgets.QGraphicsAnchor¶
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. Fixed
is the default size policy. QGraphicsAnchor
always has a minimum spacing of 0 and a very large maximum spacing.
See also
- PySide6.QtWidgets.QGraphicsAnchor.setSpacing(spacing)¶
- Parameters
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
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. Fixed
is the default size policy. QGraphicsAnchor
always has a minimum spacing of 0 and a very large maximum spacing.
See also
- PySide6.QtWidgets.QGraphicsAnchor.spacing()¶
- Return type
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
- PySide6.QtWidgets.QGraphicsAnchor.unsetSpacing()¶
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
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.