[Interest] qtScript hide a signal from script
Bo Thorsen
bo at fioniasoftware.dk
Mon May 14 07:20:47 CEST 2012
Den 14-05-2012 06:54, Prashant skrev:
> Hi group,
> While introducing c++ object properties to the script, the Q_PROPERTY
> have an option SCRIPTABLE bool. This essentially hides the property in
> script. This comes in very handy. I was wondering if something similar
> is available for Q_SIGNALS. Essentially i want to hide a particular
> signal in script. I have a very round about way now where i hide it
> while introducing into script. With innumerable types of QObjects, you
> can imagine the sphagetti code wherein I check for the kind of signal to
> hide for a kind of QObject :( ...
You can't do this. You can't hide signals and slots from the scripts. If
it's really important for you not to expose those, you have to create a
wrapper QObject that only has the signals and slots you want to expose.
And yes, it's inconsistent that you can hide properties but not signals
and slots.
Bo Thorsen,
Fionia Software.
--
Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk
More information about the Interest
mailing list