PDA

View Full Version : I can't see the widgets defined in the tab pages.



sujan.dasmahapatra
11th July 2011, 14:35
QList areas;
QListpages;

class CTabWig : public QTabWidget
{
Q_OBJECT
public:
CTabWig() ;
~CTabWig() { }
};

CTabWig::CTabWig() {

for(int i=0; i<10; i++)
{
areas.append(new QScrollArea(this));
addTab(areas.at(i),names.at(i));
pages.append(new QWidget(areas.at(i)));
areas.at(i)->setWidget(pages.at(i));
}

}
//////////////////////////////////////////////////////////////////////////////////////////
where names.at(i) are some QStrings generated...they have valid value.

But I cannot see any widgets that are defined in the pages. In these pages I have many widgets defined. Ican't see them only I can see the tabs with thei names. Whats wrong in this can anyone help me pls. Thanks sujan

Santosh Reddy
11th July 2011, 16:29
try adding a visible widget like QPushButton (not just QWidget), a QWidget does paint anything