This file contains the declaration of the NonEmptyDelegate class. More...
Go to the source code of this file.
Classes | |
class | NonEmptyDelegate |
The NonEmptyDelegate class provides functionality to ensure that table cells are not empty. More... | |
This file contains the declaration of the NonEmptyDelegate class.
The NonEmptyDelegate class is a QStyledItemDelegate subclass that provides functionality to ensure that table cells are not empty. It checks for empty cells and displays a warning message if a cell is empty. The NonEmptyDelegate class is intended to be used with QLineEdit-based editors in a table view. It is typically used with a QAbstractItemModel-based model. The NonEmptyDelegate class is derived from QStyledItemDelegate and utilizes QLineEdit as the editor widget. This class is suitable for handling non-empty cells in a table view with QLineEdit editors. When the user finishes editing a cell, the model data is checked for emptiness and the appropriate warning message is displayed. The NonEmptyDelegate class can be used in a QWidget-based application. Note: The NonEmptyDelegate class assumes that the parent widget is of type NeTrainSim, which provides the showWarning() function.