def update_font(basefont, weight=None, italic=None, underline=None, pixelSize=None, pointSize=None):
 font = QFont(basefont)
 if (weight is not None):
  font.setWeight(weight)
 if (italic is not None):
  font.setItalic(italic)
 if (underline is not None):
  font.setUnderline(underline)
 if (pixelSize is not None):
  font.setPixelSize(pixelSize)
 if (pointSize is not None):
  font.setPointSize(pointSize)
 return font

def update_font ( basefont , weight = None , italic = None , underline = None , pixelSize = None , pointSize = None ) : font = QFont ( basefont ) if ( weight is not None ) : font . setWeight ( weight ) if ( italic is not None ) : font . setItalic ( italic ) if ( underline is not None ) : font . setUnderline ( underline ) if ( pixelSize is not None ) : font . setPixelSize ( pixelSize ) if ( pointSize is not None ) : font . setPointSize ( pointSize ) return font
return a copy of basefont :class:qfont with updated properties .