[Closed] How to give user defined data type within slot?
-
I've two COM objects.
comTry.h (COM developed in QT) & plainCom.h (COM developed in pure C++).
Now my problem is that, from plainCom class, I can only access Hello() method of comTry class.
After reading some QT documentation, COM class methods need to be exposed outside, then it should be declared in public slots, which I've done but still I couldn't access it.
Further analysis on *.idl file, its mentioned as unsupported type.(But, I've registered with meta-object). Any idea?.
@
//comtry.idl ----dispinterface ICOMTry
{
properties:methods:
[id(1)] void Hello();
/****** Slot parameter uses unsupported datatype
[id(2)] void justTry([in] LPSAMPLE p_sample);
******/
};[
uuid(0D93BAE5-0C6B-43DF-ABC4-AD5CF7313FCE),
helpstring("COMTry Events Interface")
]
dispinterface ICOMTryEvents
{
properties:
methods:
/****** Signal parameter uses unsupported datatype
[id(1)] void destroyed([in] QObject p0);
******/
[id(2)] void destroyed_1();
};[
aggregatable,
helpstring("COMTry Class"),
uuid(66FD427E-5B47-4110-855A-C2B4F65C7783)
]
coclass COMTry
{
[default] dispinterface ICOMTry;
[default, source] dispinterface ICOMTryEvents;
};
@
@
//ComTry.h#include <ActiveQt/QAxBindable>
#include <QMetaType>
#include "externalFile.h"Q_DECLARE_METATYPE(LPSAMPLE)
class COMTry : public QObject , public QAxBindable
{
Q_OBJECTpublic:
COMTry(QObject *parent = 0);public slots:
void Hello();
void justTry(LPSAMPLE sample);
private:
};#endif // COMTRY_H
@@
// externalFile.htypedef struct sample {
int a;
float b;}SAMPLE, *LPSAMPLE;
@
-
Duplicating a thread is usually not a means to push a problem. You're not going to reach more co-developers this way, but risk to annoy some that might be of help otherwise. Please stick to the first thread, mentioned earlier - thanks. I'm closing this one.