Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QTreeWidget: disable highlighting items on mouse hover, or set highlighted item programmatically
Violet Giraffe last edited by
Is it possible to prohibit QTreeWidget from highlighting items on hover? I still want items to be selectable, just not being highlighted.
Alternatively, is it possible to control this highlight in any way? My problem is: I have a mouse hovering over an item and this item is highlighted. I then quickly clear the list and re-populate, and now the item that cursor is hovering is no longer highlighted, which is awkward.
P. S. I have used QCoreApplication::postEvent to post mouse move event after updating the widget, and it works, but it's not a very pretty solution...