var ar = new Array("one", "two");
plugin.do(ar);
qt object
class plugin:QObject{
Q_OBJECT
public Q_SLOTS:
void do();
};
how to define function "do()" ?
Thanks
Printable View
var ar = new Array("one", "two");
plugin.do(ar);
qt object
class plugin:QObject{
Q_OBJECT
public Q_SLOTS:
void do();
};
how to define function "do()" ?
Thanks
Code:
Q_OBJECT public slots: void do(const QVariantList ¶ms); // in your instance, you use QStringList instead of QVariantList }
Read more:
http://doc.qt.nokia.com/4.6/scriptin...pt-and-c-types
Thank you. With QStringList it works
Hi.
I try to do as you
Code:
{ Q_OBJECT public slots: ... void setXxx(const QStringList& list); signals: void bouncing(); } ... void AxBouncer::setXxx(const QStringList& list) // or QVariantList { emit bouncing(); "called through ActiveX/OLE automation!" ); emit bouncing(); }
javascript:
it works.Code:
var ar = new Array("123","456","789"); AxBouncer.setXxx(ar[2]);
This code
Throws the error:Code:
AxBouncer.setXxx(ar);
Code:
Type name 'QStringList' previously registered as typedef of 'QStringList'[11], now registering as typedef of 'IDispatch*'[1028]
bouncing signal does not work at all.
Code:
function AxBouncer::bouncing() { document.title = "Bouncing again!"; alert("Bouncing again!"); }
window 7, internet explorer 9, Qt 4.8.x and qt-everywhere-opensource-src-5.0.0-beta1, Microsoft Visual Studio 2008 and 2010 + SP1