Hi all,

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
things  manually)

This my delegate code:
https://pastebin.com/zgzTvcWQ

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?!

Cheers,
frank
_______________________________________________
PySide mailing list
PySide@qt-project.org
https://lists.qt-project.org/listinfo/pyside

Reply via email to