Recognize icon type and convert to QIcon accordingly