@brucezcg said in QListWidget: How to disable when mouse hover ,the items change background color?:
I don't want to change background color when hover,
I just want to disable hover, when hover, the items stay the background color, may be different colors, so I couldn't set
hover to certain color.
Well in that post I linked you on stackoverflow, it shows:
QListWidget::item:hover,
QListWidget::item:disabled:hover,
QListWidget::item:hover:!active,
{background: transparent;}
That means it just hides the hover, doesn't set it to a certain color. It should do exactly what you need.
You can of course make a custom delegate too. That's more work that setting a quick css though.