[KDE Dot News]
 faq
 flatforty
 contribute
 subscribe
 configure
 search
 rdf

 main
 parent
 thread


Re: QT not quite C++
by Philippe Fremy on Wednesday 14/Apr/2004, @07:16
The Gtkmm rants against Qt always comes back to the same equation:
- GTKmm is more standard == GTKmm uses templates instead of moc preprocessor to handle signal and slots
- GTKmm uses C++ in a more modern way == GTKmm uses templates instead of moc preprocessor to handle signal and slots
- GTKmm is typesafe == GTKmm uses templates instead of moc preprocessor to handle signal and slots

So yes, Qt does not use templates for signal and slots. There are drawbacks to this that are quite minimal:
- your namespace is "polluted" with the following macros: slots, signal, emit, SIGNAL, SLOT
- you have to pre-process your files through the moc.

However, the moc approach of Qt does have advantages. For example, it adds introspection feature to C++ which can be quite convenient. You can also dynamically load and connects Object.

If you write code only for the aesthethic of the result, then the debate "moc vs template signals" matters. If you write code to produce software, you don't care since both methods produce software that works. You will learn to use either in less than one day of coding.
  Related Links
 ·   Articles on Interviews
 ·   Also by Philippe Fremy
 ·   Contact author

Thread Threshold:

The Fine Print: The following comments are owned by whomever posted them.
( Reply )

  "Never miss an opportunity to throw away code." -- Guillaume Laurent
KDE®, "K Desktop Environment", "KDE Dot News", "got the dot?" and the KDE Logo® are trademarks or registered trademarks of KDE e.V. in the European Union, the United States and other countries. All other trademarks and copyrights on this page are owned by their respective owners. Comments are owned by the poster. The rest: Copyright © 2000-2008 KDE e.V. for The KDE Project. For further information or comments on this site, please contact the Webmaster.
[ home | post article | flat forty | subscribe | search | rdf ]