def METHOD_NAME(widget, italic=None, bold=None, underline=None):
    font = widget.font()
    if italic is not None:
        font.setItalic(italic)
    if bold is not None:
        font.setBold(bold)
    if underline is not None:
        font.setUnderline(underline)
    widget.setFont(font)