Remove wrong validity check
Cleanup
Use self instead of super()
Don't pass useless widget to tab_layout.
Rename option to opt.
Remove magic constant.
Construct a copy of text_rect in tab_layout.
Override subElementRect properly.
Calculate close button position correctly
Try drawing our own tab button