diff -r 71208bcc7d99 -r 40fc136e7002 src/eric7/EricWidgets/EricIconBar.py --- a/src/eric7/EricWidgets/EricIconBar.py Sat Jan 13 13:01:09 2024 +0100 +++ b/src/eric7/EricWidgets/EricIconBar.py Sun Jan 14 12:39:11 2024 +0100 @@ -342,6 +342,19 @@ self.__adjustIconLabels() + def setIcon(self, index, icon): + """ + Public method to set the icon at the given index. + + @param index icon index + @type int + @param icon reference to the icon + @type QIcon + """ + labelItem = self.__layout.itemAt(index) + if labelItem: + labelItem.widget().setPixmap(icon.pixmap(self.__barSize, self.__barSize)) + @pyqtSlot() def __iconClicked(self, label): """