After some more hacking, I'm pretty sure that my problem is the qtabbar rect.
How can I force the qtabbar rect to be always (0, 0, tabwidget.width(), 20) ?
I tried subclassing qtabwidget and resizeEvent this way:
def resizeEvent(self, e):
self.tabBar().setGeometry(self.tabBar().x(), self.tabBar().y(), self.width(), 20)
def resizeEvent(self, e):
self.tabBar().setGeometry(self.tabBar().x(), self.tabBar().y(), self.width(), 20)
To copy to clipboard, switch view to plain text mode
but tabbar rect will do weird things when resizing (in fact, it just wont paint itself. It will repaint itself only after resizing has finished.
Also, tabs won't have the size that I want, but the total size of the rect.
Bookmarks