summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qcolumnview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/itemviews/qcolumnview.cpp')
-rw-r--r--src/widgets/itemviews/qcolumnview.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/widgets/itemviews/qcolumnview.cpp b/src/widgets/itemviews/qcolumnview.cpp
index 5aee78fab4..32a3dddca1 100644
--- a/src/widgets/itemviews/qcolumnview.cpp
+++ b/src/widgets/itemviews/qcolumnview.cpp
@@ -332,11 +332,14 @@ void QColumnView::scrollTo(const QModelIndex &index, ScrollHint hint)
}
#ifndef QT_NO_ANIMATION
- d->currentAnimation.setEndValue(newScrollbarValue);
- d->currentAnimation.start();
-#else
- horizontalScrollBar()->setValue(newScrollbarValue);
+ if (style()->styleHint(QStyle::SH_Widget_Animate, 0, this)) {
+ d->currentAnimation.setEndValue(newScrollbarValue);
+ d->currentAnimation.start();
+ } else
#endif //QT_NO_ANIMATION
+ {
+ horizontalScrollBar()->setValue(newScrollbarValue);
+ }
}
/*!