Important: Please read the Qt Code of Conduct -

QTableView: delegate::paint() is not called when mouse leaves the widget

  • Hi,

    I use a QTableView along with my custom delegate and model. I have enabled mouse tracking for QTableView. When the mouse enters a table cell, I draw an icon in the cell and clears this icon when the mouse leaves the cell, using delegate's paint method. When mouse moves from one cell to another, paint methods are called for both previous and current cells as expected.

    However, when the mouse moves out of the tabeview widget from a cell, delegate's paint method is not getting called for that cell. As a result I am not able to clear the icon for that cell. I could see reference to this issue in another thread as well [1]. Is this behavior a bug?

    I am using Qt4.8.3 ATM. I would try with Qt5 as well, possibly with a test program. It would be great if any one knows about this issue already. Thanks in advance.


Log in to reply