def tuple_to_qfont(tup):
if not isinstance(tup, tuple) or len(tup) != <NUM_LIT:4>or not is_text_string(tup[<NUM_LIT:0>])or not isinstance(tup[<NUM_LIT:1>], int)or not isinstance(tup[<NUM_LIT:2>], bool)or not isinstance(tup[<NUM_LIT:3>], bool):<EOL><INDENT>return None<EOL><DEDENT>font = QFont()<EOL>family, size, italic, bold = tup<EOL>font.setFamily(family)<EOL>font.setPointSize(size)<EOL>font.setItalic(italic)<EOL>font.setBold(bold)<EOL>return font<EOL>
Create a QFont from tuple:
    (family [string], size [int], italic [bool], bold [bool])