def buildIcon(icon):
        """
        Builds an icon from the inputed information.
        
        :param      icon | <variant>
        """
        if icon is None:
            return QIcon()
        
        if type(icon) == buffer:
            try:
                icon = QIcon(projexui.generatePixmap(icon))
            except:
                icon = QIcon()
        else:
            try:
                icon = QIcon(icon)
            except:
                icon = QIcon()
        
        return icon