hello~my slot has been connected but the slot function can't be called
Can U tell me why~Ps.I use GUI in the slot indirectly~
Re: hello~my slot has been connected but the slot function can't be called
No, how could we? We don't see your code...
Re: hello~my slot has been connected but the slot function can't be called
en I will show my code if necessary~My project is sth like this:
Code:
Class A{
Q_OBJECT
public slots:
void slot();
public:
B b;
A()
} ;
Class B{
Q_OBJECT
signals:
void signal();
}
A::A()
{
connect(b,SIGNAL(signal()),this,SLOT(slot()));
}
main(){
A *a;
a=new A;
a=new A;
}
the pointer point to another member of class A before delete it. My question is,can the system find the former 'A' and run the slot() function without a pointer pointing to it.