方法一:
QStringList list; list << "1" << "2" << "1"; list.removeDuplicates();
方法二:
QStringList list; list.append(“1”); list.append(“2”); list.append(“1”); list = list.toSet().toList();