-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.9.2, 6.10.0 Beta3
I have collected some issues with QTreeview rendering on Win11 with the modern look.
The old look
First, as a comparison the video win10.mp4shows what it used to look like on Windows 10.
You can differentiate between
- Selected items
- The active item
- The item under the mouse, regardless if it is selected or not
and
- The edit box aligns perfecly.
The new look
With the Windows 11 modern look (see win11-default.mp4), you can only differentiate between "selected and/or hovering" and "others". The highlight color is painted as a rounded rect in QWindows11Style::drawPrimitive and will be either a very discrete gray, or - for the alternating rows style - a very dark blue that clashes with the black text and bleeds into the checkboxes. (The blue highlight was a fix for this issue).
There is also an issue with the edit box, as can be seen in the video.
Stylesheets
This has forced me to use style sheets in my applications to ensure usability.
The result is an acceptable emulation of the Win10 look (win11-stylesheet.mp4) with some minor issues.
The main problem is that the current rounded rect highlights are drawn in QWindows11Style::drawPrimitive and cannot be overridden by style sheets, this prohibits using transparency or rounded corners.
Suggestion
I think the highlight fix implemented here https://codereview.qt-project.org/c/qt/qtbase/+/623376 should be reverted and replaced with something less visually jarring that integrates better with style sheets.
You can even see in Qt Designer qt_designer_win11-Qt6.10-beta3.mp4that the dark blue rounded rects don't blend in well.
See also
https://bugreports.qt.io/browse/QTBUG-136130