diff options
Diffstat (limited to 'src/widgets/kernel/qboxlayout.cpp')
-rw-r--r-- | src/widgets/kernel/qboxlayout.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/widgets/kernel/qboxlayout.cpp b/src/widgets/kernel/qboxlayout.cpp index d0e7a16999..67621ade23 100644 --- a/src/widgets/kernel/qboxlayout.cpp +++ b/src/widgets/kernel/qboxlayout.cpp @@ -140,6 +140,7 @@ public: void calcHfw(int); void effectiveMargins(int *left, int *top, int *right, int *bottom) const; + QLayoutItem* replaceAt(int index, QLayoutItem*) Q_DECL_OVERRIDE; }; QBoxLayoutPrivate::~QBoxLayoutPrivate() @@ -444,6 +445,21 @@ void QBoxLayoutPrivate::calcHfw(int w) hfwMinHeight = mh; } +QLayoutItem* QBoxLayoutPrivate::replaceAt(int index, QLayoutItem *item) +{ + Q_Q(QBoxLayout); + if (!item) + return 0; + QBoxLayoutItem *b = list.value(index); + if (!b) + return 0; + QLayoutItem *r = b->item; + + b->item = item; + q->invalidate(); + return r; +} + /*! \class QBoxLayout |