workaround for broken tree indicators with Qt 5.6 under Windows

This commit is contained in:
wmayer
2017-05-20 21:21:30 +02:00
parent 08b7d9154a
commit 6bdc3eb29f
4 changed files with 19 additions and 0 deletions

View File

@@ -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);

View File

@@ -40,6 +40,8 @@
<file>ClassBrowser/type_class.svg</file>
<file>ClassBrowser/type_enum.svg</file>
<file>ClassBrowser/type_module.svg</file>
<file>style/windows_branch_closed.png</file>
<file>style/windows_branch_open.png</file>
<file>Std_ViewScreenShot.svg</file>
<file>bound-expression.svg</file>
<file>bound-expression-unset.svg</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 B