PythonQt.QtGui.QGraphicsAnchorLayout · declarations 001
Back to PythonQt.QtGui.QGraphicsAnchorLayout
activate
activate() -> Any
X.activate()
addAnchor
addAnchor(firstItem: Any, firstEdge: Any, secondItem: Any, secondEdge: Any) -> Any
X.addAnchor(firstItem, firstEdge, secondItem, secondEdge) -> PythonQt.QtGui.QGraphicsAnchor
Supplemental documentation: Qt 5 reference:
QGraphicsAnchor *QGraphicsAnchorLayout::addAnchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge)
Creates an anchor between the edge firstEdge of item firstItem and the edge secondEdge of item secondItem. The spacing of the anchor is picked up from the style. Anchors between a layout edge and an item edge will have a size of 0. If there is already an anchor between the edges, the new anchor will replace the old one.
firstItem and secondItem are automatically added to the layout if they are not part of the layout. This means that count() can increase by up to 2.
The spacing an anchor will get depends on the type of anchor. For instance, anchors from the Right edge of one item to the Left edge of another (or vice versa) will use the default horizontal spacing. The same behaviour applies to Bottom to Top anchors, (but they will use the default vertical spacing). For all other anchor combinations, the spacing will be 0. All anchoring functions will follow this rule.
The spacing can also be set manually by using QGraphicsAnchor::setSpacing() method.
Calling this function where firstItem or secondItem are ancestors of the layout have undefined behaviour.
See also addAnchors() and addCornerAnchors().
Upstream PySide2 reference signatures (binding differences may apply):
addAnchor(self, firstItem: PySide2.QtWidgets.QGraphicsLayoutItem, firstEdge: PySide2.QtCore.Qt.AnchorPoint, secondItem: PySide2.QtWidgets.QGraphicsLayoutItem, secondEdge: PySide2.QtCore.Qt.AnchorPoint) -> PySide2.QtWidgets.QGraphicsAnchor
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsanchorlayout.html#addAnchor
addAnchors
addAnchors(firstItem: Any, secondItem: Any, orientations: Any) -> None
X.addAnchors(firstItem, secondItem, orientations)
Supplemental documentation: Qt 5 reference:
void QGraphicsAnchorLayout::addAnchors(QGraphicsLayoutItem *firstItem, QGraphicsLayoutItem *secondItem, Qt::Orientations orientations \= ...)
Anchors two or four edges of firstItem with the corresponding edges of secondItem, so that firstItem has the same size as secondItem in the dimensions specified by orientations.
For example, the following example anchors the left and right edges of two items to match their widths:
layout->addAnchor(b, Qt::AnchorLeft, c, Qt::AnchorLeft);
layout->addAnchor(b, Qt::AnchorRight, c, Qt::AnchorRight);
This can also be achieved using the following line of code:
layout->addAnchors(b, c, Qt::Horizontal);
See also addAnchor() and addCornerAnchors().
Upstream PySide2 reference signatures (binding differences may apply):
addAnchors(self, firstItem: PySide2.QtWidgets.QGraphicsLayoutItem, secondItem: PySide2.QtWidgets.QGraphicsLayoutItem, orientations: PySide2.QtCore.Qt.Orientations=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsanchorlayout.html#addAnchors
addChildLayoutItem
addChildLayoutItem(layoutItem: Any) -> Any
X.addChildLayoutItem(layoutItem)
addCornerAnchors
addCornerAnchors(firstItem: Any, firstCorner: Any, secondItem: Any, secondCorner: Any) -> None
X.addCornerAnchors(firstItem, firstCorner, secondItem, secondCorner)
Supplemental documentation: Qt 5 reference:
void QGraphicsAnchorLayout::addCornerAnchors(QGraphicsLayoutItem *firstItem, Qt::Corner firstCorner, QGraphicsLayoutItem *secondItem, Qt::Corner secondCorner)
Creates two anchors between firstItem and secondItem specified by the corners, firstCorner and secondCorner, where one is for the horizontal edge and another one for the vertical edge.
This is a convenience function, since anchoring corners can be expressed as anchoring two edges. For instance:
layout->addAnchor(a, Qt::AnchorTop, layout, Qt::AnchorTop);
layout->addAnchor(a, Qt::AnchorLeft, layout, Qt::AnchorLeft);
This can also be achieved with the following line of code:
layout->addCornerAnchors(a, Qt::TopLeftCorner, layout, Qt::TopLeftCorner);
If there is already an anchor between the edge pairs, it will be replaced by the anchors that this function specifies.
firstItem and secondItem are automatically added to the layout if they are not part of the layout. This means that count() can increase by up to 2.
See also addAnchor() and addAnchors().
Upstream PySide2 reference signatures (binding differences may apply):
addCornerAnchors(self, firstItem: PySide2.QtWidgets.QGraphicsLayoutItem, firstCorner: PySide2.QtCore.Qt.Corner, secondItem: PySide2.QtWidgets.QGraphicsLayoutItem, secondCorner: PySide2.QtCore.Qt.Corner) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsanchorlayout.html#addCornerAnchors
anchor
anchor(firstItem: Any, firstEdge: Any, secondItem: Any, secondEdge: Any) -> Any
X.anchor(firstItem, firstEdge, secondItem, secondEdge) -> PythonQt.QtGui.QGraphicsAnchor
Supplemental documentation: Qt 5 reference:
QGraphicsAnchor *QGraphicsAnchorLayout::anchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge)
Returns the anchor between the anchor points defined by firstItem and firstEdge and secondItem and secondEdge. If there is no such anchor, the function will return 0.
Upstream PySide2 reference signatures (binding differences may apply):
anchor(self, firstItem: PySide2.QtWidgets.QGraphicsLayoutItem, firstEdge: PySide2.QtCore.Qt.AnchorPoint, secondItem: PySide2.QtWidgets.QGraphicsLayoutItem, secondEdge: PySide2.QtCore.Qt.AnchorPoint) -> PySide2.QtWidgets.QGraphicsAnchor
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsanchorlayout.html#anchor
contentsRect
contentsRect() -> Any
X.contentsRect() -> PythonQt.QtCore.QRectF
count
count() -> int
X.count() -> int
Supplemental documentation: Qt 5 reference:
[override virtual] int QGraphicsAnchorLayout::count() const
Reimplements: QGraphicsLayout::count() const.
Upstream PySide2 reference signatures (binding differences may apply):
count(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsanchorlayout.html#count
effectiveSizeHint
effectiveSizeHint(which: Any, constraint: Any) -> Any
X.effectiveSizeHint(which, constraint) -> PythonQt.QtCore.QSizeF
geometry
geometry() -> Any
X.geometry() -> PythonQt.QtCore.QRectF
getContentsMargins
getContentsMargins(left: Any, top: Any, right: Any, bottom: Any) -> Any
X.getContentsMargins(left, top, right, bottom)
graphicsItem
graphicsItem() -> Any
X.graphicsItem() -> PythonQt.QtGui.QGraphicsItem
horizontalSpacing
horizontalSpacing() -> float
X.horizontalSpacing() -> float
Supplemental documentation: Qt 5 reference:
qreal QGraphicsAnchorLayout::horizontalSpacing() const
Returns the default horizontal spacing for the anchor layout.
See also verticalSpacing() and setHorizontalSpacing().
Upstream PySide2 reference signatures (binding differences may apply):
horizontalSpacing(self) -> float
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsanchorlayout.html#horizontalSpacing
instantInvalidatePropagation
instantInvalidatePropagation() -> bool
X.instantInvalidatePropagation() -> bool
invalidate
invalidate() -> None
X.invalidate()
Supplemental documentation: Qt 5 reference:
[override virtual] void QGraphicsAnchorLayout::invalidate()
Reimplements: QGraphicsLayout::invalidate().
Upstream PySide2 reference signatures (binding differences may apply):
invalidate(self) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsanchorlayout.html#invalidate
isActivated
isActivated() -> bool
X.isActivated() -> bool
isLayout
isLayout() -> bool
X.isLayout() -> bool
itemAt
itemAt(index: int) -> Any
X.itemAt(index) -> PythonQt.QtGui.QGraphicsLayoutItem
Supplemental documentation: Qt 5 reference:
[override virtual] QGraphicsLayoutItem *QGraphicsAnchorLayout::itemAt(int index) const
Reimplements: QGraphicsLayout::itemAt(int i) const.
Upstream PySide2 reference signatures (binding differences may apply):
itemAt(self, index: int) -> PySide2.QtWidgets.QGraphicsLayoutItem
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsanchorlayout.html#itemAt
maximumHeight
maximumHeight() -> float
X.maximumHeight() -> float
maximumSize
maximumSize() -> Any
X.maximumSize() -> PythonQt.QtCore.QSizeF
maximumWidth
maximumWidth() -> float
X.maximumWidth() -> float
minimumHeight
minimumHeight() -> float
X.minimumHeight() -> float
minimumSize
minimumSize() -> Any
X.minimumSize() -> PythonQt.QtCore.QSizeF
minimumWidth
minimumWidth() -> float
X.minimumWidth() -> float
ownedByLayout
ownedByLayout() -> bool
X.ownedByLayout() -> bool
parentLayoutItem
parentLayoutItem() -> Any
X.parentLayoutItem() -> PythonQt.QtGui.QGraphicsLayoutItem
preferredHeight
preferredHeight() -> float
X.preferredHeight() -> float
preferredSize
preferredSize() -> Any
X.preferredSize() -> PythonQt.QtCore.QSizeF
preferredWidth
preferredWidth() -> float
X.preferredWidth() -> float
removeAt
removeAt(index: int) -> None
X.removeAt(index)
Supplemental documentation: Qt 5 reference:
[override virtual] void QGraphicsAnchorLayout::removeAt(int index)
Reimplements: QGraphicsLayout::removeAt(int index).
Removes the layout item at index without destroying it. Ownership of the item is transferred to the caller.
Removing an item will also remove any of the anchors associated with it.
See also itemAt() and count().
Upstream PySide2 reference signatures (binding differences may apply):
removeAt(self, index: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsanchorlayout.html#removeAt
setGeometry
setGeometry(rect: Any) -> None
X.setGeometry(rect)
Supplemental documentation: Qt 5 reference:
[override virtual] void QGraphicsAnchorLayout::setGeometry(const QRectF \&geom)
Reimplements: QGraphicsLayoutItem::setGeometry(const QRectF \&rect).
Upstream PySide2 reference signatures (binding differences may apply):
setGeometry(self, rect: PySide2.QtCore.QRectF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsanchorlayout.html#setGeometry
setGraphicsItem
setGraphicsItem(item: Any) -> Any
X.setGraphicsItem(item)
setHorizontalSpacing
setHorizontalSpacing(spacing: float) -> None
X.setHorizontalSpacing(spacing)
Supplemental documentation: Qt 5 reference:
void QGraphicsAnchorLayout::setHorizontalSpacing(qreal spacing)
Sets the default horizontal spacing for the anchor layout to spacing.
See also horizontalSpacing(), setVerticalSpacing(), and setSpacing().
Upstream PySide2 reference signatures (binding differences may apply):
setHorizontalSpacing(self, spacing: float) -> None
Source: https://doc.qt.io/archives/qt-5.15/qgraphicsanchorlayout.html#setHorizontalSpacing
setInstantInvalidatePropagation
setInstantInvalidatePropagation(enable: Any) -> Any
X.setInstantInvalidatePropagation(enable)
setMaximumHeight
setMaximumHeight(height: Any) -> Any
X.setMaximumHeight(height)
setMaximumSize
setMaximumSize(w: Any, h: Any) -> Any
X.setMaximumSize(w, h)
setMaximumWidth
setMaximumWidth(width: Any) -> Any
X.setMaximumWidth(width)
setMinimumHeight
setMinimumHeight(height: Any) -> Any
X.setMinimumHeight(height)
setMinimumSize
setMinimumSize(w: Any, h: Any) -> Any
X.setMinimumSize(w, h)
setMinimumWidth
setMinimumWidth(width: Any) -> Any
X.setMinimumWidth(width)