[Qt-interest] Force the emission of a signal
Ian Thomson
Ian.Thomson at iongeo.com
Fri Mar 20 17:27:58 CET 2009
If you have just one instance of your class, you can create a signal in
your application and connect that signal to your class's signal. If you
have multiple instances of your classes then this won't work unless you
create a separate signal for each one, which is messy.
The qt docs say that signals can only be emitted by the class that
defines them:
http://doc.trolltech.com/4.4/signalsandslots.html#signals
so either make a public function or a private friended function like you
suggested.
Cheers,
Ian.
Andrea Franceschini wrote:
> Obviously I can make appropriate private functions that emit the
> signals and declare the application class as a friend.
>
More information about the Qt-interest-old
mailing list