129 if (itemParent && itemParent->
isWidget()) {
130 static_cast<QGraphicsWidget *
>(itemParent)->d_func()->setLayout_helper(
this);
132 qWarning(
"QGraphicsLayout::QGraphicsLayout: Attempt to create a layout with a parent that is"
133 " neither a QGraphicsWidget nor QGraphicsLayout");
150 if (itemParent && itemParent->
isWidget()) {
151 static_cast<QGraphicsWidget *
>(itemParent)->d_func()->setLayout_helper(
this);
153 qWarning(
"QGraphicsLayout::QGraphicsLayout: Attempt to create a layout with a parent that is"
154 " neither a QGraphicsWidget nor QGraphicsLayout");
227 d->activateRecursive(
this);
232 while (parentItem && parentItem->
isLayout())
286 layoutItem->d_func()->sizeHintCacheDirty =
true;
287 layoutItem->d_func()->sizeHintWithConstraintCacheDirty =
true;
291 layoutItem->d_func()->sizeHintCacheDirty =
true;
292 layoutItem->d_func()->sizeHintWithConstraintCacheDirty =
true;
318 d->activated =
false;
332 if (parentItem->isLayout()) {
333 parentItem->updateGeometry();
static void postEvent(QObject *receiver, QEvent *event, int priority=Qt::NormalEventPriority)
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
The QGraphicsLayoutItem class can be inherited to allow your custom items to be managed by layouts.
void setOwnedByLayout(bool ownedByLayout)
virtual void updateGeometry()
This virtual function discards any cached size hint information.
bool isLayout() const
Returns true if this QGraphicsLayoutItem is a layout (e.g., is inherited by an object that arranges o...
QGraphicsLayoutItem * parentLayoutItem() const
Returns the parent of this QGraphicsLayoutItem, or \nullptr if there is no parent,...
void setParentLayoutItem(QGraphicsLayoutItem *parent)
Sets the parent of this QGraphicsLayoutItem to parent.
friend class QGraphicsLayout
QRectF contentsRect() const
Returns the contents rect in local coordinates.
virtual void setGeometry(const QRectF &rect)
This virtual function sets the geometry of the QGraphicsLayoutItem to rect, which is in parent coordi...
The QGraphicsLayout class provides the base class for all layouts in Graphics View.
virtual void updateGeometry() override
\reimp
static void setInstantInvalidatePropagation(bool enable)
bool isActivated() const
Returns true if the layout is currently being activated; otherwise, returns false.
virtual void invalidate()
Clears any cached geometry and size hint information in the layout, and posts a \l{QEvent::LayoutRequ...
virtual void widgetEvent(QEvent *e)
This virtual event handler receives all events for the managed widget.
~QGraphicsLayout()
Destroys the QGraphicsLayout object.
void getContentsMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const override
\reimp
void activate()
Activates the layout, causing all items in the layout to be immediately rearranged.
void setContentsMargins(qreal left, qreal top, qreal right, qreal bottom)
Sets the contents margins to left, top, right and bottom.
void addChildLayoutItem(QGraphicsLayoutItem *layoutItem)
static bool instantInvalidatePropagation()
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
Combined button and popup list for selecting options.
static bool g_instantInvalidatePropagation
GLdouble GLdouble GLdouble GLdouble top
static void layoutItem(QQuickItem *item, qreal y, qreal width)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent