def get_max_text_width(fm, texts):
    """Get maximum width of texts from given list

    :param QtGui.QFontMetrics fm: FontMetrics instance
    :param iterable texts: list of texts
    :return: maximum text width
    :rtype: int
    """
    return max(map(fm.width, texts))