165 if (itemParent && itemParent->
isWidget()) {
166 static_cast<QGraphicsWidget *
>(itemParent)->d_func()->setLayout_helper(
this);
168 qWarning(
"QGraphicsLayout::QGraphicsLayout: Attempt to create a layout with a parent that is"
169 " neither a QGraphicsWidget nor QGraphicsLayout");
186 if (itemParent && itemParent->
isWidget()) {
187 static_cast<QGraphicsWidget *
>(itemParent)->d_func()->setLayout_helper(
this);
189 qWarning(
"QGraphicsLayout::QGraphicsLayout: Attempt to create a layout with a parent that is"
190 " neither a QGraphicsWidget nor QGraphicsLayout");
263 d->activateRecursive(
this);
268 while (parentItem && parentItem->
isLayout())
318 while (layoutItem && layoutItem->
isLayout()) {
322 layoutItem->d_func()->sizeHintCacheDirty =
true;
323 layoutItem->d_func()->sizeHintWithConstraintCacheDirty =
true;
327 layoutItem->d_func()->sizeHintCacheDirty =
true;
328 layoutItem->d_func()->sizeHintWithConstraintCacheDirty =
true;
331 bool postIt = layoutItem ? !layoutItem->
isLayout() :
false;
334 while (layoutItem && layoutItem->
isLayout()
336 static_cast<QGraphicsLayout*
>(layoutItem)->d_func()->activated =
false;
339 if (layoutItem && !layoutItem->
isLayout()) {
354 d->activated =
false;
368 if (parentItem->isLayout()) {
369 parentItem->updateGeometry();
475 d->addChildLayoutItem(layoutItem);
478 static bool g_instantInvalidatePropagation =
false;
507 g_instantInvalidatePropagation =
enable;
519 return g_instantInvalidatePropagation;
static void postEvent(QObject *receiver, QEvent *event, int priority=Qt::NormalEventPriority)
The QEvent class is the base class of all event classes. Event objects contain event parameters.
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
The QGraphicsLayout class provides the base class for all layouts in Graphics View.
virtual void updateGeometry() override
static void setInstantInvalidatePropagation(bool enable)
virtual void invalidate()
virtual void widgetEvent(QEvent *e)
void getContentsMargins(qreal *left, qreal *top, qreal *right, qreal *bottom) const override
void setContentsMargins(qreal left, qreal top, qreal right, qreal bottom)
void addChildLayoutItem(QGraphicsLayoutItem *layoutItem)
static bool instantInvalidatePropagation()
The QGraphicsLayoutItem class can be inherited to allow your custom items to be managed by layouts.
void setOwnedByLayout(bool ownedByLayout)
virtual void updateGeometry()
QGraphicsLayoutItem * parentLayoutItem() const
void setParentLayoutItem(QGraphicsLayoutItem *parent)
friend class QGraphicsLayout
QRectF contentsRect() const
virtual void setGeometry(const QRectF &rect)
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
QT_END_INCLUDE_NAMESPACE typedef double qreal
GLdouble GLdouble GLdouble GLdouble top
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent