Skip to content

Add Default PandasTableWidget Delegate

Arthur Tavares Quintao requested to merge text-align-delegate into master

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 and BooleanPaintingDelegate to use AlignCenterDelegate.
  • Added a detailed example of subclassing DefaultDelegate.
  • Added a simple example of DefaultDelegate subclassing.
  • Updated docstring to include details on PandasTableWidget and DefaultDelegate.

Merge request reports

Loading