Hi,

I have used QObject::connect( ... ) with smart_ptr but as per the signature of connect( ... ), strictly we have to use class object derived from QObject.

this below code will work fine..!!
Qt Code:
  1. class A:public QObject{ ... }
  2. class B:public QObject{ ... }
  3.  
  4. class c:public QObject
  5. {
  6.  
  7. c::c()
  8. {
  9. A *a = new A();
  10. B *b = new B();
  11.  
  12. QObject::connect( a, SIGNAL( funA() ), b, SLOT( funB() ) );
  13. }
  14. }
To copy to clipboard, switch view to plain text mode 

but when convert *a and *b to smart_ptr<a> and smart_ptr<b> it don't work properly..!!
the signal and slot don't connect..

So can anybody help me in solving this error, any one who is using smart_ptr (boost) with Qt, give me some suggestion to go ahead .!!