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
Regular Contributor
ashish_developer
Posts: 96
Registered: ‎05-15-2013
My Device: blackberry z10
My Carrier: blackberry

Signal is not connecting to a qml finction

[ Edited ]

hi,

i am trying to connect the singnal new_im to my qml function . But i dont know why its not connecting.. I have a function name 

void PjCallback::on_pager(pjsua_call_id call_id, const pj_str_t *from,
		const pj_str_t *to, const pj_str_t *contact, const pj_str_t *mime_type,
		const pj_str_t *text) {

	PJ_UNUSED_ARG(call_id);
	PJ_UNUSED_ARG(to);
	PJ_UNUSED_ARG(contact);
	PJ_UNUSED_ARG(mime_type);

	qDebug("On pager called");
inmesg=	QString::fromAscii(text->ptr,text->slen);

if(inmesg!=NULL){

emit new_im(QString::fromAscii(from->ptr,from->slen),
	QString::fromAscii(text->ptr,text->slen));
qDebug("emitting..");
}

}

 and here is qml code to connect the signal

 

 

pjcallback1.new_im.connect(pgContactList.onnew_im);

 here is onnew_im function

 

 

function  onnew_im( string,string)
    {
        console.log("executing..")
        chatSheet.open();
        
    }

 

                         i have set the contex property in my project cpp file . All is working fine but the signal is not connecting to the function because no console hello is showing nd no sheet is opening..Please help

Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Signal is not connecting to a qml finction

Please use the 'insert code' button when entering code to avoid smiley faces and to make your code more readable.

It's the clipboard icon with the C on it.

 

Also you seem to have totally missed the use of the like button so far. It has no value beyond showing those who have taken time out to help you that you appreciate them doing so.


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Regular Contributor
ashish_developer
Posts: 96
Registered: ‎05-15-2013
My Device: blackberry z10
My Carrier: blackberry

Re: Signal is not connecting to a qml finction

i have edited the code now please help me

Please use plain text.