Exemplo n.º 1
0
def load_font(self, initialFont):
    print initialFont.key()
    font, ok = QFontDialog(initialFont).getFont()
    if ok:
        newFont = font.toString().split(',')
        return newFont[0] + ', ' + newFont[1]
    else:
        return initialFont
Exemplo n.º 2
0
    def btnLabelFontClick(self):
        dlgFont = QFontDialog(self)
        dlgFont.setCurrentFont(self.selectedLabelItem.font())
        result = dlgFont.exec_()
        if result == 1:
            self.labelFont = dlgFont.selectedFont()
        else:
            self.labelFont = QFont()

        self.selectedLabelItem.setFont(self.labelFont)
Exemplo n.º 3
0
    def changeFont_Callback(self):
        dialog = QFontDialog()
        title = "Please select font"
        newFont, ok = dialog.getFont(QFont(self.historTableFontFamily, self.historTableFontSize), self, title)

        if (ok):
            self.historTableFontFamily = newFont.family()
            self.historTableFontSize = newFont.pointSize()
            self.historyTableView.setFont(newFont)
            self.displayHistoryTableFont(newFont.family(), newFont.pointSize())
Exemplo n.º 4
0
 def on_btnFont_clicked(self):
     fd = QFontDialog(self)
     if fd.exec_():
         self.setEditorFont(fd.selectedFont())