XzibitGG
XzibitGG

Reputation: 330

Change Tab Size In QTabWidget

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.

Upvotes: 6

Views: 7972

Answers (1)

eyllanesc
eyllanesc

Reputation: 243965

You must use:

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

Upvotes: 8

Related Questions