tinkertime
tinkertime

Reputation: 3042

Qt prevent QAbstractItemDelegate ::paint() from being called for all option styles

I'm looking to avoid having my custom QAbstractItemDelegate's paint() function be called for option states that I'm not interested in. Specifically, I don't wish to support any hover functionality, so I would like to not repaint while mousing over a table cell.

Any suggestions?

Upvotes: 0

Views: 215

Answers (1)

Chris
Chris

Reputation: 17535

I don't believe there's a way to disable painting for different kinds of events generically.

However, you should be able to disable painting as a result of a mouse hover by disabling mouse tracking:

myWidget->setMouseTracking(false);

QWidget::setMouseTracking

Upvotes: 1

Related Questions