PDA

View Full Version : how to transfer javascript string array to qt with IE9



aLukas
21st October 2012, 12:41
Hi.
how to transfer javascript string array to qt with IE9 (windows7)



class AxBouncer : public QWidget, public QAxBindable
{
Q_OBJECT
public slots:
...
void setXxx(const QStringList& list);
signals:
void bouncing();
}

...
void AxBouncer::setXxx(const QStringList& list) // or QVariantList
{
emit bouncing();
QMessageBox::information( this, "About QSimpleAX", "This is a Qt widget, and this slot has been\n"
"called through ActiveX/OLE automation!" );
emit bouncing();
}


javascript:


var ar = new Array("123","456","789");
AxBouncer.setXxx(ar[2]);

it works.

This code


AxBouncer.setXxx(ar);

Throws the error:
QMetaType::registerTypedef: Binary compatibility break
Type name 'QStringList' previously registered as typedef of 'QStringList'[11],
now registering as typedef of 'IDispatch*'[1028]

bouncing signal does not work at all.
javascript:


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.
help please