eric7/EricWidgets/EricIconBar.py

branch
eric7
changeset 8725
842ba8a9dbbb
parent 8724
6ee36599a1f8
child 8768
09a4a3c5b161
equal deleted inserted replaced
8724:6ee36599a1f8 8725:842ba8a9dbbb
270 @param index index of the icon to be removed 270 @param index index of the icon to be removed
271 @type int 271 @type int
272 """ 272 """
273 label = self.__layout.itemAt(index) 273 label = self.__layout.itemAt(index)
274 if label: 274 if label:
275 # self.__layout.removeItem(label)
276 # self.__layout.removeWidget(label.widget())
277 with contextlib.suppress(IndexError): 275 with contextlib.suppress(IndexError):
278 del self.__icons[index] 276 del self.__icons[index]
279 itm = self.__layout.takeAt(index) 277 itm = self.__layout.takeAt(index)
280 itm.widget().deleteLater() 278 itm.widget().deleteLater()
281 del itm 279 del itm

eric ide

mercurial