Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
johnnyusa1
Posts: 3
Registered: ‎01-13-2012
My Device: bb bold
My Carrier: vodafone

call ItemRemoved in custom Group data model

I have a custom Group Data Model made in C++.How can I get the signal from onItemRemoved and do Something.

 

I tried

 

void CustomdataMODEL::ItemRemoved(QVariantList){

do something

}

result : not called

 

void CustomdataMODEL::smileysurprised:nItemRemoved(QVariantList){

 

do something

}

 

result : not called

 

connect(myCustomModel, SIGNAL(itemRemoved(QVariantList)), SLOT(removedItem()));

 

void CustomdataMODEL::removedItem(QVariantList){

 

do something

}

 

result : not called

 

 

This is more a c++ question maybe?

Thanks

Please use plain text.
Contributor
raysonyeung
Posts: 21
Registered: ‎02-07-2013
My Device: Z10
My Carrier: Company

Re: call ItemRemoved in custom Group data model

I think your connection function call is wrong.

 

connect(myCustomModel, SIGNAL(itemRemoved(QVariantList)), this , SLOT(onItemRemoved(QVariantList)));

 

void CustomdataMODEL::smileysurprised:nItemRemoved( QVariantList list ){

qDebug() << "it works";

}

Please use plain text.