170void QQuickGroupBox::setLabel(QQuickItem *label)
173 if (d->label == label)
176 QQuickControlPrivate::warnIfCustomizationNotSupported(
this, label, QStringLiteral(
"label"));
178 if (!d->label.isExecuting())
181 const qreal oldImplicitLabelWidth = implicitLabelWidth();
182 const qreal oldImplicitLabelHeight = implicitLabelHeight();
184 d->removeImplicitSizeListener(d->label);
185 QQuickControlPrivate::hideOldItem(d->label);
189 if (!label->parentItem())
190 label->setParentItem(
this);
191 d->addImplicitSizeListener(label);
194 if (!qFuzzyCompare(oldImplicitLabelWidth, implicitLabelWidth()))
195 emit implicitLabelWidthChanged();
196 if (!qFuzzyCompare(oldImplicitLabelHeight, implicitLabelHeight()))
197 emit implicitLabelHeightChanged();
198 if (!d->label.isExecuting())