def __init__(self, path):
super().__init__()
uic.loadUi('ui/csv_import_window.ui', self)
self.file_path = path
self.notes = []
self.on_change = lambda: False
# It is possible to validate multiple times without that
self.validated = False
self.amount.setValidator(api.validator.NUMBER)
self.reason.setValidator(api.validator.NAME)
self.recap.header().setStretchLastSection(False)
self.recap.header().setSectionResizeMode(1,
QtWidgets.QHeaderView.Stretch)
try:
self._build_recap()
except KeyError:
gui.utils.error("Erreur", "Le fichier CSV fourni est mal formé")
raise csv.Error
else:
self.show()
评论列表
文章目录