Exemplo n.º 1
0
    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();
    }
Exemplo n.º 2
0
 void startTimeLine()
 {
     if (mOpacityTimeLine->state() != QTimeLine::Running) {
         mOpacityTimeLine->start();
     }
 }
Exemplo n.º 3
0
 void startTimeLine()
 {
     if (mTimeLine->state() != QTimeLine::Running) {
         mTimeLine->start();
     }
 }