[Qt-interest] Basic non modal dialog question

Scott Aron Bloom scott at onshorecs.com
Thu Feb 18 03:49:17 CET 2010


On Feb 17, 2010, at 5:43 PM, Phil wrote:
>
>> ??!!   Of course signals and slots work across classes.
>
> Take this code for instance:
>
> connect(action_OpenMyDialog, SIGNAL(triggered()), this,
> SLOT(showDialog()));
>
> This works if showDialog() is a member of the class that sends the  
> signal
> but how do I write code where the showDialog() slot is a member of a
> different class?

easy...

connect( action_OpenMyDialog, SIGNAL( triggered() ), obj,  
SLOT( show() ) );

where obj is a pointer to the other objedct.

Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100217/a9b08d95/attachment.html 


More information about the Qt-interest-old mailing list