Forms not refreshing on tabs
-
have a look at "this thread.":http://developer.qt.nokia.com/forums/viewthread/8492/
;) -
-
hello everybody
Im trying to display 3 forms(calender, history, statistics) which has 3 classes into a MainWindow Class which has three tabs created using the designer. When the application runs for the first time, it displays the history form into the tab. But when it is being run the second time, the form is displayed over the tabs that the tabs are not visible. :(
@
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{ui->setupUi(this); CalenderForm *pCal = new CalenderForm(); lay = new QVBoxLayout(ui->tab); lay->addWidget(pCal); connect(ui->tabWidget,SIGNAL(currentChanged(int)),this,SLOT(a(int)));
}
void MainWindow::a(int index)
{
switch(index)
{
case 0:
callCal();
break;case 1: callHist(); break; default: break; }
}
void MainWindow::callHist() { HistoryForm *pHis = new HistoryForm(); pHis->DisplayHistory(); pHis->show(); lay2 = new QVBoxLayout(ui->tab_2); lay2->addWidget(pHis); }
@
alfah
Eddy : EDIT please don't start new topics for the same problem.