workaround for broken tree indicators with Qt 5.6 under Windows
This commit is contained in:
@@ -195,6 +195,22 @@ void DlgGeneralImp::saveSettings()
|
||||
qApp->sendEvent(getMainWindow(), &e);
|
||||
mdi->setBackground(QBrush(QColor(160,160,160)));
|
||||
}
|
||||
|
||||
#if QT_VERSION == 0x050600 && defined(Q_OS_WIN32)
|
||||
// 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
|
||||
}
|
||||
|
||||
if (mdi->style())
|
||||
|
||||
Reference in New Issue
Block a user