When the source cell is changed, the dependent cells are updated from the event. A spreadsheet has cells that observe the source cell(s). It is easy to use and no registration/deregistration/invocation code need to be written, because Qt's metaobject compiler (MOC) automatically generates the needed infrastructure.Ī commonly used metaphor is a spreadsheet. Similarly, the signal/slot system can be used for other non-GUI usages, for example asynchronous I/O (including sockets, pipes, serial devices, etc.) event notification or to associate timeout events with appropriate object instances and methods or functions. The signal/slot system fits well with the way graphical user interfaces are designed. This is similar to C/C++ function pointers, but signal/slot system ensures the type-correctness of callback arguments. The concept is that GUI widgets can send signals containing event information which can be received by other widgets / controls using special functions known as slots. Signals and slots is a language construct introduced also in Qt for communication between objects which makes it easy to implement the observer pattern while avoiding boilerplate code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |