def METHOD_NAME(self):
    if self.boldButton.isChecked():
        self.format.setFontWeight(QtGui.QFont.Bold)
    else:
        self.format.setFontWeight(QtGui.QFont.Normal)
    self.textEdit.setCurrentCharFormat(self.format)
    self.textEdit.setFocus()