[Interest] qtScript hide a signal from script
Prashant
prashant.me at gmail.com
Wed May 16 05:13:05 CEST 2012
Thanks Bo. This is what I am doing now. But you need typewise checking
which makes the code unnecessarily lengthy and cumbersome. Pity I need to
keep doing it. As you said a inconsistent behavior.
On Mon, May 14, 2012 at 10:50 AM, Bo Thorsen <bo at fioniasoftware.dk> wrote:
> 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
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
--
Prashant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120516/0f088306/attachment.html>
More information about the Interest
mailing list