[PyQt] QTabWidget tab width change

David Boddie david at boddie.org.uk
Tue Jun 12 23:00:07 BST 2012

On Tue Jun 12 17:48:06 BST 2012, David Cortesi wrote:

> >   1. QTabWidget tab width change (Ganesh Kumar)
> >
> > I have try with pyqt, with QTabWidget I want increase tab width my
> > application. How to achieve tab width. please guide me.


> If you insist, you could use the setTabBar() method to replace the default
> QTabBar with one you have created. In your customized QTabBar, you would
> implement your own tabSizeHint() method to tell Qt what size to make the
> tab at a given index. Good luck with that.

Certainly, it can be done, but there are no guarantees as to whether it will
always work, or even if the desired behaviour can be obtained at all:



More information about the PyQt mailing list