Include settings defined in base classes.

cls.__dict__.items() does not return inherited members, while dir(cls)
does. getattr needs default value as some members might not be
accessible yet (i.e. staticMetaObject).