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..!!
{
c::c()
{
A *a = new A();
B *b = new B();
QObject::connect( a,
SIGNAL( funA
() ), b,
SLOT( funB
() ) );
}
}
class A:public QObject{ ... }
class B:public QObject{ ... }
class c:public QObject
{
c::c()
{
A *a = new A();
B *b = new B();
QObject::connect( a, SIGNAL( funA() ), b, SLOT( funB() ) );
}
}
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 .!!
Bookmarks