void BoxLayout::insertItem(int index, QGraphicsLayoutItem *item) { if (!item || d->children.contains(item)) { return; } // item->setManagingLayout(this); if (index == -1) { index = d->children.size(); } d->children.insert(index, item); if (animator()) { animator()->setCurrentState(item, LayoutAnimator::InsertedState); } updateGeometry(); }