[Development] changing Q_GADGET

Simon Hausmann simon.hausmann at theqtcompany.com
Fri Nov 28 13:52:45 CET 2014

On Friday 28. November 2014 13.36.56 Al-Khanji Louai wrote:
> Out of the box, C++ makes class member declarations private. I quite
> strongly feel that changing that behavior in a macro is not what the user
> expects. So for me at least the "better API" box is not being checked here
> - I quite regularly declare private variables under Q_OBJECT and have done
> so with Q_GADGET as well.

Well, that is exactly the motivation. Class members are private by default, 
struct members are public by default. Q_GADGET is changing that for no good 
reason :)


More information about the Development mailing list