My QStyledItemDelegate does not behave consistently on Windows and Mac.
General and Desktop
1
Posts
1
Posters
773
Views
1
Watching
-
I have created a
QListViewthat uses aQStyledItemDelegateto display some data.In my custom delegate I have a paint event that is responsible for painting the text the way I want it
void UserListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const { ... if (option.state & (QStyle::State_MouseOver)) { // Change color.The thing is that this works fine on windows and the paint event is called each time I hover above an item. In MacOS though it does not. My widget does not care if I hover above an item or not.
This is one of the many ways that paint works differently on Mac and Windows.
Has anyone any idea on why is that?
EDIT:
If the info I provided is not enough, please do say so.