There is a "entered" signal for a QTreeView Widget, which I can use to check if my mouse moves over an item.
Is there a way to implement an "left" signal?
Why: I have a treeView with a lot of items which I also plot via QChart. I want to highlight the plot when someone mouse over the data in the treeview. I can highlight it via the "entered" signal, but I have no idea how to change it back to the default if the mouse left/mouse is over another item...
entered
is a member of QAbstractItemView
. You should probably reimplement QAbstractItemView::dragLeaveEvent
virtual method.
See this method documentation: http://doc.qt.io/qt-5/qabstractitemview.html#dragLeaveEvent
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.