magicgui icon indicating copy to clipboard operation
magicgui copied to clipboard

Add types to Table widget columns

Open kevinyamauchi opened this issue 4 years ago • 1 comments

Thanks for the great work on magicgui, @tlambert03 ! I'm working on dock widget plugin for viewing/modifying layer properties and I would like to use magicgui to generate the table widget. I think it would be nice if there was a way to specify the type for a column and have some type conversion when the user edits values (e.g., {'false', 'False'. 0} -> False, and {'true', 'True', 1} -> True for a bool column).

I have a simple version of this working in Qt (using the setData method in the table model) in my prototype (see here).

kevinyamauchi avatar Apr 07 '21 09:04 kevinyamauchi

Love it

tlambert03 avatar Apr 07 '21 10:04 tlambert03