Q_SCRIPT_DECLARE_QMETAOBJECT(Report, QObject*) construct paramst
Hi!
I try to use my c++ object in qtScript and I need to create c++ object in QtScript with several arg such as
var p = new Report("report1",9);
but Q_SCRIPT_DECLARE_QMETAOBJECT(Report, QObject*) has 1 params....
Is it possible to construct my own c++ object in qt script with sevral constuctor params&
Thanks.
Re: Q_SCRIPT_DECLARE_QMETAOBJECT(Report, QObject*) construct paramst
bump bump
would love to know this too if even possible or some other kind of workaround
Re: Q_SCRIPT_DECLARE_QMETAOBJECT(Report, QObject*) construct paramst
Use QScriptable class. Also view the default prototype example.
Re: Q_SCRIPT_DECLARE_QMETAOBJECT(Report, QObject*) construct paramst
yea i got it now using Q_DECLARE_METATYPE and a constructor function now..
its just the documentation is kind of confusing