Esempio n. 1
0
    def __init__(self, parent, top):
        super().__init__(parent=parent)
        self.top = top
        self.setFixedHeight(46)
        self.setProperty('class', 'head')

        self.back_btn = IcoButton(top, self, ico=0xe011)
        self.back_btn.setProperty('what', 'back')
        self.back_btn.clicked.connect(self.back_home)
        self.refresh_btn = IcoButton(top, self, text='刷新', ico=0xe012)
        self.refresh_btn.setProperty('what', 'refresh')
        self.refresh_btn.clicked.connect(self.refresh)

        layer = CommonHBox()
        layer.addWidget(self.back_btn)
        layer.addStretch(2)
        layer.addWidget(self.refresh_btn)
        self.setLayout(layer)
Esempio n. 2
0
    def __init__(self, parent, top):
        super().__init__(parent)
        self.top = top
        self.setProperty('class', 'set-about')
        self.set_dialog = SetDialog(self, top)
        self.about_dialog = AboutDialog(self, top)

        layer = CommonHBox()
        self.set_btn = CommonBtn(chr(0xe002), self)
        self.set_btn.clicked.connect(self.set_dialog.exec)
        self.about_btn = CommonBtn(chr(0xe003), self)
        self.about_btn.clicked.connect(self.about_dialog.exec)

        layer.addStretch(0)
        layer.addWidget(self.set_btn, alignment=qt.Qt.AlignRight)
        layer.addWidget(self.about_btn, alignment=qt.Qt.AlignRight)
        self.setLayout(layer)

        self.set_qss.connect(self.do_set_qss)
        self.set_qss.emit()