[Qt-interest] Using Strings instead of SIGNAL(foo())

Hari Sundar hsundar at gmail.com
Wed Jan 28 21:16:58 CET 2009


Hi Scott,

Thats not what I am trying to do ... I want to take a string parameter,
obtained from say the user ... and emit a Signal based on that ...   i.e.,
normally One would make the connection like

connect( this, SIGNAL( sigMySignal( ) ), object, SLOT( slotMySlot( ) ) );

I am interested in doing it as,

connect( this,  myStringSignal, object, SLOT( slotMySlot( ) ) );

and then somehow ....

emit FUNCT(myStringSignal);

I hope you understand what I want to do ?

thanks,
Hari

On Wed, Jan 28, 2009 at 2:40 PM, Scott Aron Bloom
<Scott.Bloom at sabgroup.com>wrote:

>  Are you trying to emit a signal with a single parameter as a string?
>
>
>
> signals:
>
> void sigMySignal( const QString &  ) ;
>
>
>
> with a connection like:
>
> connect( this, SIGNAL( sigMySignal( const QString & ) ), object, SLOT(
> slotMySlot( const QString & ) ) );
>
>
>
> Will do the trick…
>
>
>
> Scott
>
>
>
> *From:* qt-interest-bounces at trolltech.com [mailto:
> qt-interest-bounces at trolltech.com] *On Behalf Of *Hari Sundar
> *Sent:* Wednesday, January 28, 2009 9:41 AM
> *To:* qt-interest at trolltech.com
> *Subject:* [Qt-interest] Using Strings instead of SIGNAL(foo())
>
>
>
> Hi,
>
> I am interested in emitting a signal based on a string ... now since
> SIGNAL(foo) converts the function to a string ... I should be able to manage
> this ... right ?
>
> Is this possible ? How would I go about doing this ?
>
> thanks,
> Hari
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>


-- 
1 (215) 501 7752
http://www.seas.upenn.edu/~hsundar/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090128/5b3227d3/attachment.html 


More information about the Qt-interest-old mailing list