[ActiveQt] How can I get IDispatch pointer from QAxObject?
Hello.
I'm using MapWinGIS ActiveX control.
I want to add a shp file layer to map control, and map control needs IDispatch pointer.
Shpfile is a QAxObject class. (created by dumpcpp tool.)
Code:
#include "MainWindow.h"
using namespace MapWinGIS;
MainWindow
::MainWindow(QWidget *parent
) :{
QString mapPath
= "ne_10m_admin_0_boundary_lines_land.shp";
ui.setupUi(this);
ui.map->SetBackColor( Qt::black);
Shapefile *sf = new Shapefile();
sf->Open( mapPath, NULL );
ui.map->AddLayer( ????? );
}
How can I get IDispatch pointer from QAxObject?
ps. Sorry for the poor English.
Re: [ActiveQt] How can I get IDispatch pointer from QAxObject?
Hi,
Did you find any answer ? I am having the same kind of issue with PyQt.
Regards
Re: [ActiveQt] How can I get IDispatch pointer from QAxObject?
Code:
IUnknown *iface = 0;
activeX->queryInterface(IID_IUnknown, (void**)&iface);
if (iface) {
// use the interface
iface->Release();
}
or
Code:
IDispatch*disp= 0;
activeX->queryInterface(IID_IDispatch, (void**)&disp);
if (disp) {
// use the interface
disp->Release();
}