To do this you just put in the add tab function this:
self.tabs.setTabIcon(i, browser.icon())
browser.iconChanged.connect(lambda icon, browser=browser: self.update_icon(browser, icon))
and create this fuction:
def update_icon(self, browser, icon):
index = self.tabs.indexOf(browser)
self.tabs.setTabIcon(index, icon)
If you have any questions tell me
You can also see how I did it in my project
here:
Just to know I also tried to find it for two months until today that I found
this code that includes the solution