Originally Posted by kiwidude
actual_icon = None
resource = self.load_resource(icon_name)
pixmap = QPixmap()
actual_icon = QIcon(pixmap)
actual_icon = QIcon(I(icon_name))
Given the new list interface, the problem becomes much more tractable. You load the icons you need from the zip into the dict. Some might not be there. You then loop through the items you need using a simple if x in list: test. If they is in the dict, cool. If not, you use the file approach. That lets the customizers put their icons in the local resources/images directory (or a subdir if they want to). There is almost zero time penalty because the zip scan was done once and you would need to open the files anyway.
And yeah as Chaley says if you have a lot of icons you are opening/closing the zip a lot of times.
Problem gone with list interface.