QListIn this example, a QList of integers is created with some duplicate values. The toSet() function is then called on this list to convert it into a QSet that contains only unique elements. The package library for QList and toSet() is the Qt library.list = {1, 2, 3, 3, 4, 4, 5}; QSet set = list.toSet();