QIcon myIcon("path/to/icon.png"); QListsizes = myIcon.availableSizes();
QIcon myIcon(":/icons/icon.png"); QListThis example creates a QIcon object using a resource file and then calls availableSizes to get a list of available icon sizes for that icon. Both of these examples demonstrate how the availableSizes function can be used to obtain a list of available icon sizes for a QIcon object. The Qt library provides the QIcon class, making it part of the Qt framework.sizes = myIcon.availableSizes();