I'd like the decoration item of QTreeView to be a clickable button
So far I am using a delegate whose createEditor function will create the button, but the button isn't created until the model enters the edit state.
This means that in order to have the button exist at all times, I must enable mouse tracking on the parent QTreeView.
I can then figure out if the mouse is over the tree view and the (hopefully) figure out the model index it is hovering over.
At this point I can call the delegates edit function on that index.
Is there a better way? I'm also afraid about the overhead of enabling mousetracking...
Thanks for any input