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. |
|
|