PDA

View Full Version : activeQT problem with Qt5 and not with Qt4



gegebelzebuth
26th December 2014, 15:13
Hello everybody,

I'm having a problem porting an application from Qt 4.8 to Qt 5.3

That code is working with Qt 4.8 :


QAxWidget * ax = new QAxWidget();
bool ret1 = ax->setControl("{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}");
QVariantList params;
params << 1 << "192.168.0.50";
int ret2 = ax->dynamicCall("SetURL(int, QString)", params).toInt();


I can compile it with Qt5 without problem but ret2 is giving me an error code

if I change my code to :


...
params << 1 << "";
int ret2 = ax->dynamicCall("SetURL(int, QString)", params).toInt();


ret2 is good (but of course i need to put an IP Address)

Any idea ?
Thx !

ChrisW67
27th December 2014, 01:38
Perhaps it would be good to share the run time error code and its meaning.

gegebelzebuth
27th December 2014, 10:30
Thank you but i haven't got any runtime error
All seems ok, but the return code (ret2) is different with QT5.
the return code is good if i put QString("") as parameter for both QT5 and QT4
the return is not good if i put QString("192.168.0.50") on QT5
the return is good if i put QString("192.168.0.50") on QT4

d_stranz
27th December 2014, 23:43
In all my years of programming, I have never seen the error codes "good" and "not good" in connection with ActiveX. I've seen S_OK, 0x80040154 and many others, but never those two. You must be using the Express version of ActiveX.