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 revisionBoth sides next revision
qt:signals_and_slots [2010/12/09 15:01] – [Multiple connections] mithatqt:signals_and_slots [2010/12/09 15:10] – [Making connections] mithat
Line 10: Line 10:
 </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. The number of parameters emited by a signal is allowed to be greater than the number of parameters received by a slot. In this case, the extra parameters are ignored.
  
-For example:((From Molkentin, p. 37))+Errors in connecting signals and slots are not reported in compiling or linking. However, they will produce a runtime warning: \\ 
 +''Object::connect: Incompatible sender/receiver arguments YourClass::aSignal(char,double) --> AnotherClass::aSlot(double)'' 
 + 
 + 
 +Example:((From Molkentin, p. 37))
 <code cpp-qt> <code cpp-qt>
 QSpinBox* spinBox = new QSpinBox; QSpinBox* spinBox = new QSpinBox;
qt/signals_and_slots.txt · Last modified: 2011/04/01 11:10 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki