diff -r 6a315398a554 -r 78971b458d25 eric7/EricWidgets/EricIconBar.py --- a/eric7/EricWidgets/EricIconBar.py Thu Sep 09 19:04:53 2021 +0200 +++ b/eric7/EricWidgets/EricIconBar.py Thu Sep 09 19:22:12 2021 +0200 @@ -164,8 +164,12 @@ for index, icon in enumerate(self.__icons): iconLabel = self.__layout.itemAt(index) - iconLabel.setFixedSize(self.__barSize, self.__barSize) - iconLabel.setPixmap(icon.pixmap(self.__barSize, self.__barSize)) + if iconLabel: + widget = iconLabel.widget() + if widget: + widget.setFixedSize(self.__barSize, self.__barSize) + widget.setPixmap( + icon.pixmap(self.__barSize, self.__barSize)) def barSize(self): """ @@ -239,7 +243,6 @@ """ # the stretch item is always the last one self.insertIcon(self.count(), icon, label=label) - self.__icons.append(QIcon(icon)) def insertIcon(self, index, icon, label=""): """