From dca5cb4f146f31173383ded40b6a851118a7b2f6 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 30 Oct 2020 22:19:37 +0100 Subject: [PATCH] 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 Reviewed-by: hjk --- src/plugins/coreplugin/manhattanstyle.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/coreplugin/manhattanstyle.cpp b/src/plugins/coreplugin/manhattanstyle.cpp index 92c59e77eae..5a6b80f0d62 100644 --- a/src/plugins/coreplugin/manhattanstyle.cpp +++ b/src/plugins/coreplugin/manhattanstyle.cpp @@ -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; }