Hi,
I am having a BaseClass which inherits QObject. Now, this BaseClass is inherited by all of my class files in the application.
BaseClass.h will look like.
class BaseClass: public QObject{
Q_OBJECT
public:
BaseClass();
BaseClass(AbstractPane *pane);
}
Inherited class header file looks like
class ApplicationUI : public BaseClass
{
public:
ApplicationUI(bb::cascades::Application *app);
virtual ~ApplicationUI() {}
Q_INVOKABLE void screenTriggered();
AbstractPane *root;
};
I’m binding a QML file for ApplicationUI class which has a Menu option and will call screenTriggered() method upon menu click.
The issue is the screenTriggered() method is not working in my case. A log saying “TypeError: Result of expression ‘cppObj.screenTriggered’ [undefined] is not a function.” is displayed in Terminal.
Without Baseclass implementation, inheriting the QObject directly to ApplicationUI class is working perfectly.
Please help me out.
Thanks,
Sha.
↧