[Qt-interest] Convert to signal and slot

Till Oliver Knoll till.oliver.knoll at gmail.com
Thu Jul 21 20:22:17 CEST 2011



Am 21.07.2011 um 19:42 schrieb Sajjad <dosto.walla at gmail.com>:

> observer pattern ...
> 
> Any hint on how to do this ?
> 

Yes: the Model emits signals upon change and the Model (aka Observer) connects those to its slots. The moc compiler does the glue (basically all the painful wiring with the Observable interface you have to hand-code in e.g. Java. In Qt the "connect"ion is a one-liner. Easy. :)

Read the Qt docs about "signals and slots".

Cheers, Oliver


More information about the Qt-interest-old mailing list