void DrillDownView::currentChanged(const QModelIndex ¤t, const QModelIndex &previous) { if ((current.isValid() && previous.isValid()) && (current.parent() == previous || previous.parent() == current)) { setUpdatesEnabled(false); setRootIndex(currentIndex().parent()); setCurrentIndex(currentIndex()); executeDelayedItemsLayout(); // Force the hiding/showing of scrollbars setVerticalScrollBarPolicy(verticalScrollBarPolicy()); newView = QPixmap::grabWidget(viewport()); setUpdatesEnabled(true); int length = qMax(oldView.width(), newView.width()); lastPosition = (previous.parent() == current) ? length : 0; animation.setFrameRange(0, length); animation.stop(); animation.setDirection(previous.parent() == current ? QTimeLine::Backward : QTimeLine::Forward); animation.start(); } else { QListView::currentChanged(current, previous); } }
void hackedExecuteDelayedItemsLayout() { executeDelayedItemsLayout(); }