User Tools

Site Tools


qt:wiring_up_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:wiring_up_signals_and_slots [2011/03/31 15:02] mithatqt:wiring_up_signals_and_slots [2011/03/31 15:07] mithat
Line 28: Line 28:
  
 === Behind the scenes === === Behind the scenes ===
-How does the build system know that that ''button_quit'''s ''clicked()'' signal connects to ''MainWindow'''s ''on_button_quit_event_clicked()'' slot? It appears that the connection between signals and slots created this way is done purely via a naming convention along the following lines: ''//<widget-name>//'' ''//<signal>()//'' automatically connects to any slot of the form ''//<ClassName>//::on_//<widget-name>_<signal>()//''.+How does the build system know that that ''button_quit'''s ''clicked()'' signal connects to ''MainWindow'''s ''on_button_quit_event_clicked()'' slot? It appears that the connection between signals and slots created this way is done purely via a naming convention along the following lines: 
 +<code cpp><widget-name> <signal-name>()</code> automatically connects to any slot of the form <code cpp><ClassName>::on_<widget-name>_<signal-name>()</code>
 == Question == == Question ==
 If the above is true, then it should be possible to create event handlers just by writing code. Two tests are indicated: If the above is true, then it should be possible to create event handlers just by writing code. Two tests are indicated:
qt/wiring_up_signals_and_slots.txt · Last modified: 2011/04/03 13:14 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki