[Interest] Item View Painting issue

Scott Bloom scott at towel42.com
Tue May 13 18:40:59 CEST 2025


In my transition from Qt5 to Qt6 (yes, I’m late to the game 😊) one thing I have noticed that is different, and Im not sure if its intentional or not so I wanted to ask.

For many Tree and List Views, when you select an item that has a custom value for the role Qt::BackgroundRole, the color does NOT get painted when thew following conditions exist,
the item is selected and the mouse is NOT hovering over the item.

If the item is not selected, or the mouse is elsewhere all is well.  However, when both conditions exist the custom color is lost.

I have tried it with both list and tree views, I have not tried it with table or any other views.  The corresponding Widget without a custom model, also shows the same issue.

If this is expected “theme” behavior, I understand (don’t like, but understand) if it’s a bug I can file one.  A test case would be pretty straightforward to create.

I have attached a link to a video showing the issue.

Scott

https://www.dropbox.com/scl/fo/iw1ecxwb7tmmyk8kr55ng/ABnldt4As3Q7WvbeGNoXVwU?rlkey=svlx7tmhbed9xkqk0jlamfvao&st=047c9mg1&dl=0



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20250513/cb47d66c/attachment.htm>


More information about the Interest mailing list