User Tools

Site Tools


qt:signals_and_slots

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
qt:signals_and_slots [2010/12/09 15:13] – [Multiple connections] mithatqt:signals_and_slots [2011/04/01 11:10] (current) mithat
Line 6: Line 6:
 A connection between a signal and a slot is made as follows: A connection between a signal and a slot is made as follows:
 <code cpp-qt> <code cpp-qt>
-QObject::connect({pointer to emiter}, SIGNAL({signal-name}({parameter-type(s)})), +QObject::connect(<pointer-to-emiter>, SIGNAL(<signal-name>(<parameter-type(s)>)), 
-                 {pointer to receiver}, SLOT({slot-name}({parameter-type(s)})));+                 <pointer-to-receiver>, SLOT(<slot-name>(<parameter-type(s)>)));
 </code> </code>
  
-The emiter emits the signal ''{signal-name}'' with a list of values whose types are identified with ''{parameter-types(s)}''. The receiver receives this signal into its ''{slot-name}'' slot along with the values emitted with the signal. The slot then takes the appropriate action depending on the value of the passed parameters. +The emiter emits the signal ''<signal-name>'' with a list of values whose types are identified with ''<parameter-types(s)>''. The receiver receives this signal into its ''<slot-name>'' slot along with the values emitted with the signal. The slot then takes the appropriate action depending on the value of the passed parameters. 
  
 Example:((From Molkentin, p. 37)) Example:((From Molkentin, p. 37))
qt/signals_and_slots.1291907630.txt.gz · Last modified: 2010/12/09 15:13 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki