def change_font(self, *args): fd = QFontDialog(self.build_font_obj(), self) if fd.exec_() == fd.Accepted: font = fd.selectedFont() fi = QFontInfo(font) self.current_font = [unicode(fi.family()), fi.pointSize(), fi.weight(), fi.italic(), font.stretch()] self.update_font_display() self.changed_signal.emit()
def change_font(self, *args): fd = QFontDialog(self.build_font_obj(), self) if fd.exec_() == fd.Accepted: font = fd.selectedFont() fi = QFontInfo(font) self.current_font = [unicode_type(fi.family()), fi.pointSize(), fi.weight(), fi.italic(), font.stretch()] self.update_font_display() self.changed_signal.emit()