
Originally Posted by
vishva
Can you tell me ,what is the problem in nested signals and slots ?
The problem is that you are forming a new connection every time the fun1() slot is called. The old connections naturally remain unless you disconnect them.
I'm not sure what are you trying to achieve, but maybe you need something like this:
void Sample::fun1()
{
disconnect(&object,SIGNAL(clicked()),this,SLOT(fun1() ));
connect(&object,SIGNAL(clicked()),this,SLOT(fun2() ));
}
void Sample::fun1()
{
disconnect(&object,SIGNAL(clicked()),this,SLOT(fun1() ));
connect(&object,SIGNAL(clicked()),this,SLOT(fun2() ));
}
To copy to clipboard, switch view to plain text mode
Bookmarks