Pointer to ActiveX object in QT
How can I get a pointer to an ActiveX object encapsulated by a QAxWidget?
I've searched through alot of documentation and I haven't found anything that works.
The control is created through QAxWidget.setControl and an ID string. Maybe you can create the object right away somehow and pass a pointer to it to the setControl function? I have no idea, I'm quite new to COM programming...
I'm looking for something like this MFC code:
SomeInterface* axObject = GetDlgItem(IDC_NAME)->GetControlUnknown();
Thank you.
Re: Pointer to ActiveX object in QT
Same like everywhere: queryInterface()
Copied from Qt Docs:
Code:
IUnknown *iface = 0;
activeX->queryInterface(IID_IUnknown, (void**)&iface);
if (iface) {
// use the interface
iface->Release();
}