2

I don't manage to find a way to put an icon to the right side of a tab. By default, PyQt puts it to the left side. What is the code to change this ?

Here is what I have for the moment :

The tabs

The red cross is my icon but I don't manage to put it to the right side

Here is my code :

tab_index1 = self.tab_widget.addTab(self.tab, "Tab 1")
self.tab_widget.setTabIcon(tab_index1, QtGui.QIcon('icon.png'))

And another problem I have is that the code inside the tab is cut because of the icon. Someone knows how to fix this ?

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
DigitalRomance
  • 305
  • 2
  • 7

0 Answers0