Add Default PandasTableWidget Delegate
I removed the hardcoded text alignment from the model and defined an AlignCenterDelegate
in the view. To combine center alignment and input validation (to prevent crashes), I created a DefaultDelegate
that combines InputValidationDelegate
and AlignCenterDelegate
. PandasTableWidget
now uses this DefaultDelegate
but it can be subclassed and modified to create new delegate functionalities.
Other changes:
- Refactored
CheckboxCenteringDelegate
andBooleanPaintingDelegate
to useAlignCenterDelegate
. - Added a detailed example of subclassing
DefaultDelegate
. - Added a simple example of
DefaultDelegate
subclassing. - Updated docstring to include details on
PandasTableWidget
andDefaultDelegate
.