Exemple #1
0
 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()
Exemple #2
0
 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()