PDA

View Full Version : how to put the tabbar at the left in a tabwidget



qtopiahooo
14th December 2006, 06:04
hi, all

I want to implement a tabwidget, which puts the tabbar at the left or right. and the other behaviors are the same with QTabWidget.

what i need to do is firstly to implement a tabbar which layout vertically and then to rearrange the tabbar and widgetstack in tabwidget.
but i find out that the layout related member funtions of QTabbar and QTabWidget are
private. so i cannot subclass them to rearrange.

now maybe two ways can resolve it.
1. copy the entire code of QTabWidget or QTabbar, and modify the Layout and sizeHint funtions.
2. set my implement class friend of the QTabWidget and QTabbar, thus i can access the private members of them. This method need to compile Qt library over again.

anyone has better solutions?Thanks.

e8johan
14th December 2006, 06:49
Qt has support for that, but it seems that Qt three does not... I think that you will have to create your own tab widget and combine it with a widget stack, just as you say.