[Qt-interest] how to add a scrollBar in QTabWidget

Sujan Dasmahapatra sdh at lmwindpower.com
Wed Jul 13 11:06:49 CEST 2011


Dear Friends

I want to add a scrollbar in some of the tab pages in QTabWidget. How
can I achieve this. ?

 

class TabWidget: public QTabWidget

{

                Q_OBJECT;

public:

                TabWidget();

                ~TabWidget();

private:

                QList<QWidget *> pages;

                QList<QScrollArea *> areas;

};

 

TabWidget::TabWidget() {

For(int i=0; i<10; i++)

{

                areas.append(new QScrollArea(this));

                pages.append(new QWidget(areas.at(i)));

                areas.at(i)->setWidget(pages.at(i));

                addTab(areas.at(i),names.at(i)); //names is QStringList
of 10 strings.

}

}

 

But with this its not coming I cannot see the contents in pages. Please
give some suggestions. Thanks sujan

 

 

Kind Regards,

 

 

Sujan Dasmahapatra
Project Leader, Aero Group
Aero Group

Tel    +91 80 66470248
Mob  

sdh at lmwindpower.com <mailto:%25EMAIL%25> 

 

LM Wind Power Blades

lmwindpower.com

 

Together we capture the wind to power a cleaner world

________________________________

 

This e-mail and any attachments are confidential. If you are not the
named or intended recipient, please notify the sender immediately and do
not disclose the contents to any other person, use it for any purpose,
or store or copy the information in any medium. Any unauthorized
disclosure, use or storage is prohibited and might be unlawful.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110713/a32942ff/attachment.html 


More information about the Qt-interest-old mailing list