Originally Posted by
salmanmanekia
Hi,
the slot statement in the connect isnt right ,there is no variable name in the paranthesis in connect it should be like ...SLOT(NextTab(int)) ....and for the same function you are using int in the paranthesis while in the function itself it is void..
Great, thank you, I changed this to
current code:
connect(widget.NextBtn, SIGNAL(clicked()), this, SLOT(NextTab()));
..
..
void HelloForm::NextTab(void){
if (widget.tabWidget->currentIndex()!=-1)
{
widget.tabWidget->setCurrentIndex(this->TabIndex=+1);
}
}
connect(widget.NextBtn, SIGNAL(clicked()), this, SLOT(NextTab()));
..
..
void HelloForm::NextTab(void){
if (widget.tabWidget->currentIndex()!=-1)
{
widget.tabWidget->setCurrentIndex(this->TabIndex=+1);
}
}
To copy to clipboard, switch view to plain text mode
And got it partially working. I get it to go to tab2 but for some reason it doesn't go to the third one...
And also my perevious button isn't working at all:
connect(widget.PereviousBtn, SIGNAL(clicked()), this, SLOT(PereviousTab()));
...
...
void HelloForm::PereviousTab(void){
if (widget.tabWidget->currentIndex()!=-1)
{
widget.tabWidget->setCurrentIndex(this->TabIndex=-1);
}
}
connect(widget.PereviousBtn, SIGNAL(clicked()), this, SLOT(PereviousTab()));
...
...
void HelloForm::PereviousTab(void){
if (widget.tabWidget->currentIndex()!=-1)
{
widget.tabWidget->setCurrentIndex(this->TabIndex=-1);
}
}
To copy to clipboard, switch view to plain text mode
Any more clues?
Thanks,
roN
Bookmarks