<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div class="default-style">
<div class="default-style">
I have a current Gentoo system with Qt5.15 and KDE 5.26 and I have just
<br>rebuilt some RYO apps I originally wrote back in 2010 and updated to
<br>KF5 in 2018. The affected apps use a QTreeWidget and highlight various
<br>rows using QTreeWidgetItem::setForeground. This has always worked
<br>until I rebuilt the apps with current Qt/KF5 libraries. Now the
<br>setForeground still gets called correctly but has no effect. A bit of
<br>searching revealed that foreground/background functions are disabled if
<br>a Qt stylesheet is in use. My code doesn't call any setStyleSheet
<br>functions and using a Qt sample (https://forum.qt.io/topic/131729) I
<br>get the expected behaviour: the functions work until you call
<br>setStyleSheet. But the functions never work with my KF5 apps. I assume
<br>that KF5 theming (or some such) is using style sheets? I checked with
<br>qtconfig and that has none set. I have tried calling
<br>QTreeWidget::setStyleSheet("") but that has no effect.
</div>
<div class="default-style">
So how do I get row highlighting working with the latest KF5?
</div>
<div class="default-style">
</div>
<div class="default-style">
TIA
<br>Robin
</div>
</div>
</body>
</html>