def __init__(self):
super().__init__()
uic.loadUi('ui/main_window.ui', self)
# The QListWidget item currently selected.
self.selected = None
# The nickname of th currently selected note.
self.selected_nickname = None
# Timer used to add a delay when selecting a note.
self.timer = None
# The secondary window currently opened. It' here to force having only
# one window opened at a time.
self.win = None
# The mail window. This is needed to store the mail window which cannot
# be used as a usual secondary window as it's a QMainWindow instead
# of a QDiaload. A QMainWindow is required in order to have a menubar
self.mail_window = None
# Hack to count ecocups to add/delete.
self.eco_diff = 0
# Build the notes_list
self.rebuild_notes_list()
# Set product list header width
self.product_list.setColumnWidth(0, 30)
self.product_list.setColumnWidth(1, 128)
self.product_list.setColumnWidth(2, 40)
# Set the headers of the history in the note details.
self.note_history.header().setStretchLastSection(False)
self.note_history.header().setSectionResizeMode(
2,
QtWidgets.QHeaderView.Stretch
)
self.check_alcohol()
评论列表
文章目录