forked from qt-creator/qt-creator
Don't animate TreeView expansions
Some styles set a QStyle::SH_Widget_Animation_Duration. An animation does not go well with just-in-time population of the expanded content. This change avoids that for all TreeViews. Fixes: QTCREATORBUG-24834 Change-Id: I16ca4c61733d8875e713d7349ed6b99ba37ecf74 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -387,6 +387,10 @@ int ManhattanStyle::styleHint(StyleHint hint, const QStyleOption *option, const
|
||||
if (Utils::HostOsInfo::isMacHost())
|
||||
ret = QFormLayout::AllNonFixedFieldsGrow;
|
||||
break;
|
||||
case QStyle::SH_Widget_Animation_Duration:
|
||||
if (widget->inherits("QTreeView"))
|
||||
ret = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user