@norobro : Thanks for the reply. Problem solved. So, it seems the class QDir has QStringlist 'included' in it rather than inheriting it.
Also, the window.h in your post belongs to version 4.6. Mine is of version 4.2. You can find it here. But I guess the 4.2 version will compile fine because if you notice, no new object of class QDir is being declared in the version I quoted. It will give error only if any non-pointer declaration takes place in the code(as in the version you quoted). But I'm not sure about this.
Bookmarks