Hello,
I need a check list box which its checkboxes look like an asterisk (just like the following picture):
Sample.png
I want to use these checkboxes to specify favorite items.
I have created the above check list box by QListWidget and customize its items by deriving a delegate from QStyledItemDelegate. But I do not know how to realize that the cursor is located on the asterisk region to display hover effects and fill it when the user clicks on it. I derived a class from QListWidget and override its mouseMoveEvent but I did not find any way to get an item's position to calculate its asterisk position!
Added after 34 minutes:
WOW!
I did not see visualRect function till now! That is exactly what I need. I solved my problem.
Bookmarks