Hi.
I try to do as you
{
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();
}
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();
}
To copy to clipboard, switch view to plain text mode
javascript:
var ar = new Array("123","456","789");
AxBouncer.setXxx(ar[2]);
var ar = new Array("123","456","789");
AxBouncer.setXxx(ar[2]);
To copy to clipboard, switch view to plain text mode
it works.
This code
AxBouncer.setXxx(ar);
AxBouncer.setXxx(ar);
To copy to clipboard, switch view to plain text mode
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]
QMetaType::registerTypedef: Binary compatibility break
Type name 'QStringList' previously registered as typedef of 'QStringList'[11],
now registering as typedef of 'IDispatch*'[1028]
To copy to clipboard, switch view to plain text mode
bouncing signal does not work at all.
function AxBouncer::bouncing()
{
document.title = "Bouncing again!";
alert("Bouncing again!");
}
function AxBouncer::bouncing()
{
document.title = "Bouncing again!";
alert("Bouncing again!");
}
To copy to clipboard, switch view to plain text mode
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
Bookmarks