Example #1
0
 def chooseFont(self):
     fontDialog = QFontDialog()
     fontDialog.setCurrentFont(
         QFont(self.chatFont.text(), int(self.chatFontSize.text()), -1,
               False))
     fontDialog.exec()
     self.chatFont.setText(fontDialog.currentFont().family())
     self.chatFontSize.setText(
         str(int(fontDialog.currentFont().pointSizeF())))
Example #2
0
 def show_font_dialog(self):
     dialog = QFontDialog(self.label.font(), self)
     dialog.currentFontChanged.connect(self.label.setFont)
     dialog.fontSelected.connect(self.label.setFont)
     dialog.exec()