Skip to content

Add new Pandas Table Widget

Arthur Tavares Quintao requested to merge add-new-pandas-table-widget into master

This MR introduces a proposal for a new Pandas Table widget design. Instead of a widget, the new Pandas Table is structured as a model, a view and some custom delegates classes that can be combined according to the developer's needs. This way we mantain code modularity and consistency with th Qt MV framework.

Under /examples you can find:

  • Pandas Table basic example
  • Pandas Table connected to Signals from Checkboxes
  • Pandas Table with Boolean Painting Delegate
  • Editable Pandas Table with Input validation
  • Pandas Table with Checkable and Boolean Status columns

Structure:

pyqt
└── pandas_table
    ├── __init__.py
    ├── _model.py
    └── _model.py

About the delegates:

BooleanPaintingDelegate

This delegate is responsible for visually indicating the status of boolean values in a table. It changes the background color of the cell based on the value (e.g., green for True and red for False), allowing users to quickly identify the status of each item at a glance.

InputValidationDelegate

This delegate provides input validation functionality for editing cells in the table. It ensures that the data entered by the user adheres to specific criteria before it is committed to the model. If the input is invalid, an error is logged, and the data is not updated.

CheckableDelegate

This delegate allows cells to contain checkboxes, enabling users to select or deselect options directly within the table. It manages the state of checkboxes based on user interactions and emits signals to notify when the state changes.

Merge request reports

Loading