QTreeWidget: disable highlighting items on mouse hover, or set highlighted item programmatically



  • 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...


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.