void SDeclarativeIndicatorContainer::doLayoutChildren() { Q_D(SDeclarativeIndicatorContainer); int xPosition = 0; int itemsShown = 0; const QSize itemSize(d->indicatorSize); for (int i = 0; i < childItems().count(); i++) { QDeclarativeItem *child = qobject_cast<QDeclarativeItem *>(childItems().at(i)->toGraphicsObject()); if (child && child->isVisible()) { if (itemsShown >= d->maxIndicatorCount && d->maxIndicatorCount >= 0) { child->setSize(QSize(0, 0)); continue; } if (itemsShown++) xPosition += d->indicatorPadding; child->setPos(xPosition, 0); child->setSize(itemSize); xPosition += child->width(); } } setImplicitWidthNotify(xPosition); setImplicitHeightNotify(itemSize.height()); d->layoutRequestPending = false; }