Forms not refreshing on tabs
-
hi
The forms dont seem to be refreshing when i switch tabs,
obj.repaint() should repaint the form with all widgets right?? -
is the form you want to repaint in the QTabWidget or is it modal?
If you want some action to be triggered when you change to another tab on a QTabWidget you can use signal slots.
-
have a look at "this thread.":http://developer.qt.nokia.com/forums/viewthread/8492/
;) -
hey eddy,
I know its a late response, weekend you know :)
yeaa the problem is similar, the values are saved but it wont be displayed unless you exit and start application. So that means the form jus needs refreshing.
Wat does repaint exactly do???alfah
-
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.
-
ahh k sorry
-
Have you solved your problem? If yes, mark the topic as [SOLVED] ;-), otherwise I suggest that you explain a little better what do you want, I still could not get the problem/goal completely.