3
votes

I recently learned about QTabWidget and tried using it in python. My question is, can I change the height, width and background of each individual tab?

I tried doing

self.Tab1.setStyleSheet("background: white")

but that did nothing.

Thanks in advance.

1

1 Answers

3
votes

You must use:

{your QTabWidget}.setStyleSheet("QTabBar::tab { height: 100px; width: 100px; background: 'red'}")