Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.4.2
-
None
-
Qt 5.4.2 gcc 64-bit, Linux Mint 17.1 Cinnamon
-
4f324d4655a093b406134624ff753eb518429b83
Description
- Create a QTableWidget, fill it with any arbitrary data and enable mouse tracking
- Set a custom item delegate
- Override the delegate paint() method to switch on whether or not QStyleOptionViewItem::state contains QStyle::State_MouseOver or not
Expected behaviour: when moving over the table cells, the cell under the mouse is painted differently and when exiting the table, all cells look the same.
Actual result: If the mouse exits the table widget from the side of the currently hovered cell, that cell will remain active and its delegate's paint() method will continue having QStyle::State_MouseOver option flag (move mouse from bottom to top and upwards out of the widget).
Attached is a working code sample that demonstrates the bug.
Attachments
For Gerrit Dashboard: QTBUG-46785 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
126737,16 | Fix item keeping hover highlight even when mouse has left it | 5.8 | qt/qtbase | Status: MERGED | +2 | 0 |