[PySide] sanity checking a customcheckbox delegate
frank at ohufx.com
Mon Sep 5 00:54:10 CEST 2022
I have written a delegate to get a simple checkbox in a cell.
To my surprise it all started working when I simply used
index.model().setData() inside the createEditor method.
I am please that it works but it doesn't feel right as I expected to have
to commit data or something (I might just be getting confused because I am
using QTableWidget this time, not a view where one has to do a few more
This my delegate code:
The table widget has a mousePresEvent that starts editing cells on click to
avoid having to triple click the checkbox.
So yeah, it seems to work, but can somebody have a quick peek and let me
know if this is reliable or if I should be doing more to complete the
editing of the model data properly?!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PySide