[Kde-bindings] Qyoto: SIGNALS/SLOTS
Arno Rehn
kde-bindings at arnorehn.de
Sat Dec 24 18:05:41 UTC 2005
Am Freitag, 23. Dezember 2005 23:33 schrieb Arno Rehn:
> Am Montag, 19. Dezember 2005 17:21 schrieb Adam Treat:
> > On Monday December 19 2005 7:02 am, Richard Dale wrote:
> > > In Qyoto the '_smokeObject' is a pointer directly to the C++ instance,
> > > it is a struct which contains that pointer, along with several other
> > > things. So it is the direct equivalent of the Qt# QtSharp class.
> > >
> > > From qyoto.h:
> > >
> > > struct smokeqyoto_object {
> > > bool allocated;
> > > Smoke *smoke;
> > > int classId;
> > > void *ptr;
> > > };
> > >
> > > The 'ptr' field is the C++ instance. 'allocated' is true if the C#
> > > instance was allocated from the C# side, or false if an existing C++
> > > instance was wrapped, and the C++ instance shouldn't be deleted on
> > > garbage collection. 'classId' is a numeric identifier that is used in
> > > the lookup tables inside the Smoke library. 'smoke' is a handle to the
> > > Smoke library instance being used for the class (always the same for
> > > every class in the current implementation).
> >
> > Ahh, that is cool. I had something similar for libqtsharp. So, Arno, it
> > looks like the problem you were having was you were trying to connect the
> > smoke object directly, instead of the underlying QObject which is the
> > void ptr. However, I think Richard is absolutely right, you don't want
> > to be using Qt#'s libqtsharp for signal/slot connections on the C/C++
> > side of things when SMOKE will provide this for you. Better to do it the
> > SMOKE way since that is the binding library.
>
> Ok, I think I can do it now the 'non-SMOKE-way'. But I agree it would be
> better to do it the SMOKE way. But what would that be?
Yepp, I actually DID it the 'non-SMOKE-way'. I uploaded the modified files and
commented them well, so it should be very easy to understand. Please note
that libqtsharp.so from Qt# is needed.
I know it is not very good to use the Qt#-way but it is a point from where we
could start.
http://www.arnorehn.de/programming/qyoto_signals.tar.gz
--
Arno Rehn
arno at arnorehn.de
More information about the Kde-bindings
mailing list