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
Super Contributor
JeffLemon
Posts: 437
Registered: ‎01-13-2011
My Carrier: NA

Passing a signal to it's parent's class?

[ Edited ]

I have a payments class with the signal:

 

void priceResponseSuccess(const QString &price);

 

Emitted by:

 

emit priceResponseSuccess(reply->price());

 

 

And in my main app I have:

 

h:

signals:
		void priceResponseSuccess(const QString &price);

 

cpp:

Payments *payments = new Payments;
payments->getPrice(QString("hello"), QString("1"));
bool res = QObject::connect(payments, SIGNAL(priceResponseSuccess(const QString &price)), this, SLOT(handlePayment(const QString &price)));
Q_UNUSED(res);

void App::handlePayment(const QString &price)
{
}

 

But I get the error:

 

Warning: Object::connect: No such signal Payments::priceResponseSuccess(const QString &price) in ../src/app.cpp:105

 

Is there a way to pass a signal from a class to another class?

 

Thanks

 

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Please use plain text.