-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.4.0, 5.4.1
-
None
-
Windows 8.1 x64
QTreeView doesn't show alternating row color in high contrast windows theme. But it works fine in standard windows theme.
Code to reproduce this bug:
#include <QApplication>
#include <QTreeView>
#include <QStandardItemModel>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QStandardItemModel model;
for (int row = 0; row < 10; row++)
for (int col = 0; col < 10; col++)
{
QStandardItem* item = new QStandardItem(QString("r%0,c%1").arg(row).arg(col));
model.setItem(row, col, item);
}
QTreeView view;
view.setModel(&model);
view.setAlternatingRowColors(true);
view.show();
return a.exec();
}
You can:
1) Start the program when high contrast theme already applied
2) Start the program when standard theme applied then change theme to high contrast