MOC extends C++ to support reflection.
Originally Posted by ciplogic
Q_CLASSINFO is probably what you would use in place of an attribute in C#.
There is a lot more, and the only things you cannot really find any counterpart for in Qt is LINQ and WPF.
class Foo : public QObject
Q_CLASSINFO( "MyAttribute", "WhateverValue" );
Foo *bar = new Foo();
if( bar->metaObject()->indexOfClassInfo( "MyAttribute" ) > 0 )
// Has the attribute
The rest is there, and even works better in most cases imo.
Memory management with Qt is a non-brainer, with methods like deleteLater().
I don't recall ever getting a memory leak in a Qt app.
Many of the people that thinks they need C#/.NET have started their programming career programming using it, like many of those who started coding VB or Delphi long time ago, and never even tried anything else.
I started coding Delphi when I was 12 or so, and when I switched to Linux full time in 2005 I couldn't do that all of a sudden.
That's when I started exploring new languages, like C++, Ruby and PHP and now I would never go back to Delphi, ever.