6

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.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
XzibitGG
  • 330
  • 5
  • 18

1 Answers1

8

You must use:

{your QTabWidget}.setStyleSheet("QTabBar::tab { height: 100px; width: 100px; background: 'red'}")
eyllanesc
  • 235,170
  • 19
  • 170
  • 241