[PyQt] PyQt Digest, Vol 95, Issue 9
davecortesi at gmail.com
Tue Jun 12 17:48:06 BST 2012
On Tue, Jun 12, 2012 at 4:00 AM, <pyqt-request at riverbankcomputing.com>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.
The idea is that the tab bar will resize the tabs in an appropriate way,
depending on the number of tabs and the width of the tab widget. If the
user can resize the window, the tab bar will adjust as necessary. This can
be complicated. If possible you should just let Qt do its job.
If the problem is that you have too many tabs and they become too small,
note the setUsesScrollButtons() method, allowing the tab bar to scroll when
there are more tabs than will fit.
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt