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
Developer
Posts: 206
Registered: ‎05-15-2012
My Device: None

Re: Can't connect ListView triggered signal with slot (C++)

Maybe also have your class extend Q_OBJECT?

class MyPage : public bb::cascades::Page, public QObject
{
Q_OBJECT

	public slots:
		void openSheet(QVariantList indexPath);
//...
};

 

 

I think the custom types stuff you are looking at was deprecated, but I do have it scattered around my app so it might still be necessary.

----------------------
Check out my app, Alien Flow for reddit

And of course, like my post if you found it helpful or informative!
New Contributor
Posts: 7
Registered: ‎02-20-2013
My Device: Developer

Re: Can't connect ListView triggered signal with slot (C++)

QObject is already inherited though Page.

 

Tried wrapping it in namespace and adding

class BBCASCADES_EXPORT SpecialCases : public bb::cascades::smileytongue:age

as well. no dice.

I think that's about it for me tonight. Thanks for the help.

Developer
Posts: 1,523
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Can't connect ListView triggered signal with slot (C++)

Please show the complete header.

There should be this line present at the top, this should fix 'vtable' error:

#include <QObject>

The class definition should look like this:

class MyPage : public bb::cascades::smileytongue:age
{
Q_OBJECT
...

After making these changes clean all & rebuild so MOC is re-run.


Andrey Fidrya, @zmeyc on twitter
New Contributor
Posts: 7
Registered: ‎02-20-2013
My Device: Developer

Re: Can't connect ListView triggered signal with slot (C++)

QObject was already included through bb/cascades/Page, however cleaning and rebuilding with Q_OBJECT in the class definition did the trick. Thanks folks.