main_window.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:Enibar 作者: ENIB 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号