Hello
i have this connection:
Qt Code:
  1. //Class A
  2. connect( treeWidgetA, SIGNAL( clicked( const QModelIndex& ) ), this, SLOT( doSomething(const QModelIndex& ) ) );
To copy to clipboard, switch view to plain text mode 

I have to move the doSomething slot in B class too, and i want to connect the B's class treeWidget signal clicked, to the slot doSomething that already exists in class A.is it correct?

Qt Code:
  1. //Class B
  2. AClass *aClass;//is it correct?
  3. connect( treeWidgetB, SIGNAL( clicked( const QModelIndex& ) ),aClass , SLOT( doSomething(const QModelIndex& ) ) );
To copy to clipboard, switch view to plain text mode 

This approach is not working..am a declaring Aclass wrong in the B's class code?

*the slot doSomething is declared as public slot in class A*

Thanks!