Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[NOT Solved]Help with ActiveQt: exposing QObject* as Q_PROPERTY
Dear All, I know it is quite hard to get support on ActiveQt, probably because only a few people use this module.
Here is my problem.
I have an application that is composed of different QtPlugin.
I already have added a COM compoment to the main application.
Now I would like to give access to some MyObject* (that inherits QObject) that are created by the plugins. I'm not really sure how to do this. With what I already tried it seems that I would have to add the .cpp of those classes in my main application (which does not make sense) otherwise it won't link
I also tried to expose it as a QObject but it will be ignored when building the COM interface:
@ /****** Property is of unsupported datatype
[id(2), readonly] QObject* params;
Should I have one QaxFactory per plugin? I currently only have one for the main application
Does the factory has to be aware of the implementation of MyObject (ie. the cpp)?
Thanks a lot for your help
excuse the bump
Should I post this on the devlist?
The interest list would be a good place
JulienMaille last edited by JulienMaille
Still unanswered so far :(
You would like to expose the Qt QObject to your com object. Is that correct ?. Any QObject which need to be exposed to COM, should be made COM compatible. You need to expose COM object only. I have simple example of this. I made this in MSVC++ and not able open them as my license expired. If you are ok, give your email id. I can dump the samples to you.
I sent you my email by PM.
Yes I want to expose some QObjects, but these are objects from my plugins, not from the main application, as detailed in my first post.
Exposing my "top level" QObject already works, I'm struggling with these childs object that comes from plugins
What do you mean "should be made COM compatible"?
What I meant was that any QObject need to be exposed outside need to be exposed through COM or one of return type of COM component method. I feel your objects in Qt Plugin needs to be exposed through COM only. I have not experimented this through Qt plugin though.
Can you please share your sample code? You should have received my email
Still clueless on that topic