[Qt-interest] structure through connect()

Chandru... sekarwagmare at gmail.com
Thu Aug 13 11:27:20 CEST 2009


i try queued connection but its failed ... even i registered it .. cant
connect it  ..  can any one provide me any example ...

On Wed, Aug 12, 2009 at 6:31 PM, Sean Harmer <
sean.harmer at maps-technology.com> wrote:

> On Wednesday 12 Aug 2009 13:51:16 John McClurkin wrote:
> > Chandru... wrote:
> > > hi friends,
> > > is it possible ti send data structure through connect from one object
> to
> > > another ...
> > >
> > > how ..?
> >
> > Well, have you tried something that didn't work? Do you want to use
> > direct connections or queued connections? For direct connections, just
> > pass the structure by reference or by value as described in the
> > documentation, i.e.:
> >
> > void mySlot(MyStruct struct)
> > {
> > }
> > connect(obj1, SIGNAL(mySig(MyStruct)), obj2, SLOT(mySlot(MyStruct)));
> >
> > or
> >
> > void mySlot(MyStruct &struct)
> > {
> > }
> > connect(obj1, SIGNAL(mySig(MyStruct &)), obj2, SLOT(MySlot(MyStruct&)));
> >
> > I don't think you can send references in queued connections.
> However, you can send pointers or some kind of smart pointer
> (QSharedPointer
> for e.g.).
>
> Sean
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>



-- 
WAGMARE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090813/0618e3ea/attachment.html 


More information about the Qt-interest-old mailing list