QT

QT Development Comment Pattern:

1. Instantiate the required widgets and set their properties.

2. Add widgets to layouts, which automatically take care of sizing and positioning.

3. Use Qt's signals and slots mechanism to manage interface behavior.

-----------------------------------------------------------------------

1. The Q_OBJECT macro at the beginning of the class definition is necessary for all classees that define signals or slots.

2.

connect( sender, SIGNAL( signal), receiver, SLOT( slot));

connect( sender, SIGNAL( signal), reveiver, SIGNAL( signal));

To successfully connect a signal to a slot( or to another signal), they must have the same parameter types in the same order.

Exceptionally, if a signal has more parameters than the slot it is connected to, the additional parameters are simply ignored.

posted @ 2011-07-12 13:14  soulnearby  阅读(221)  评论(0编辑  收藏  举报