diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp
index 2de7dce685..cece611c68 100644
--- a/src/Gui/Application.cpp
+++ b/src/Gui/Application.cpp
@@ -1780,6 +1780,23 @@ void Application::runApplication(void)
qApp->sendEvent(&mw, &e);
}
}
+#if QT_VERSION == 0x050600 && defined(Q_OS_WIN32)
+ else {
+ // Under Windows the tree indicator branch gets corrupted after a while.
+ // For more details see also https://bugreports.qt.io/browse/QTBUG-52230
+ // and https://codereview.qt-project.org/#/c/154357/2//ALL,unified
+ // A workaround for Qt 5.6.0 is to set a minimal style sheet.
+ QString qss = QString::fromLatin1(
+ "QTreeView::branch:closed:has-children {\n"
+ " image: url(:/icons/style/windows_branch_closed.png);\n"
+ "}\n"
+ "\n"
+ "QTreeView::branch:open:has-children {\n"
+ " image: url(:/icons/style/windows_branch_open.png);\n"
+ "}\n");
+ qApp->setStyleSheet(qss);
+ }
+#endif
//initialize spaceball.
mainApp.initSpaceball(&mw);
diff --git a/src/Gui/Icons/resource.qrc b/src/Gui/Icons/resource.qrc
index acbef34ba3..c976aee3aa 100644
--- a/src/Gui/Icons/resource.qrc
+++ b/src/Gui/Icons/resource.qrc
@@ -40,6 +40,8 @@
ClassBrowser/type_class.svg
ClassBrowser/type_enum.svg
ClassBrowser/type_module.svg
+ style/windows_branch_closed.png
+ style/windows_branch_open.png
Std_ViewScreenShot.svg
bound-expression.svg
bound-expression-unset.svg
diff --git a/src/Gui/Icons/style/windows_branch_closed.png b/src/Gui/Icons/style/windows_branch_closed.png
new file mode 100644
index 0000000000..d13516d328
Binary files /dev/null and b/src/Gui/Icons/style/windows_branch_closed.png differ
diff --git a/src/Gui/Icons/style/windows_branch_open.png b/src/Gui/Icons/style/windows_branch_open.png
new file mode 100644
index 0000000000..b625caacb7
Binary files /dev/null and b/src/Gui/Icons/style/windows_branch_open.png differ