void smoothScrollTo(const QModelIndex& index) { if (!index.isValid()) { return; } const QRect rect = q->visualRect(index); int oldValue = scrollBar()->value(); int newValue = scrollToValue(rect); if (mTimeLine->state() == QTimeLine::Running) { mTimeLine->stop(); } mTimeLine->setFrameRange(oldValue, newValue); mTimeLine->start(); }
void startTimeLine() { if (mOpacityTimeLine->state() != QTimeLine::Running) { mOpacityTimeLine->start(); } }
void startTimeLine() { if (mTimeLine->state() != QTimeLine::Running) { mTimeLine->start(); } }